ccampbell/sonic — pull request #26 by gordyr (2012-07-09 11:33:58+00:00)
Title: Ensures all CSS files are loaded before showing the injected fragment / Simple resource management

Two main changes:-

1. Hides fragment until all CSS files added via the "addCss" method are loaded. from my apps homepag
2. Simple resource management - Keeps a log of add JS/CSS files and checks against them before loading them. This is very useful when dynamically loading fragments via ajax calls in order to prevent repeated http requests.

e.g. When navigating from my applications 'welcome' page to 'user control panel' only a single fragment needs to be updated rather than a full page load. Therefore I perform an ajax request to get the html of the required fragment. With the above changes, the response of this request was reduced down to around 200ms from about 800ms. You can now essentially specify all required resources needed to render a fragment without repeating requests under any circumstance (ajax request or full page load)