Closed gordyr closed 12 years ago
Just so you're aware, please check out the most recent update to this pull request as in my previous two attempts i copied/pasted a working copy of the file accidentally. I'm still getting used to github!
Reopened with correct changes.... Sorry!
This is my first pull request ever so I'm not sure i've done this right...
Anyway, the two minor changes I have made do the following:
The second change is very useful if you are loading fragments dynamically as I am. i.e. You don't need to reload a full page, you just want to change a fragment (ajax navigation).
Previously if you did this all css/js files were reloaded and parsed a second time (even though they are cached by the browser), with this check in place Sonic will ignore the duplicate resources when loading in a fragment dynamically via an ajax request.
As an example, when a user logs in to my app they are taken to their control panel. This change doesn't require a page refresh, it simply requires a single fragment to be replaced. This change is performed via an ajax request which replaces the content.
This change dropped this request from 800+ms to approx 200-250ms.