I’m just being a perfectionist looking for some trouble so…
Double loading of scripts
Can’t SF just check the version ( $().jquery; or jQuery.fn.jquery; ) and if versions are the same or Sitefinity version is less than Web.UI version not load jQuery twice?
Also, if I’m not completely mistaking, Microsoft.Ajax.js and Microsoft.Ajax.Webforms.js is double loaded when using RadControls no? I see ‘orginal’ versions coming from Telerik.Web.UI.Webresource.axd and others from a ScriptResource.axd
If we minimize the non minified scriptresource.axd left, we’d save ourself easily 100Kb. I know 100Kb is nothing but with a couple of thousand unique pageviews we’re talking about hundreds of Mb bandwith …
Combined script marshaling.
When using combined scripts to get the most optimized result, a lot of scripts don’t get cached because of a different combination of packing them together.
Couldn't we create some marshaling option in the BackEnd or have some smarter combining?
Imagine page A having a menu, a search box and some text. Imagine page B have the same menu but a news overview. Just because page A has a search box and B doesn’t the following list of scripts don’t get cached:
I think it’s fair to say that all these scripts will be used around a website build with Sitefinity… These are the basic Sitefinity scripts and RadControl script. One combined scriptresource.axd with all the general scripts easily saves 100Kb on every subsequent browsed pages.
This feature could be done by either an Administration > Advanced > Pages> ScriptManager option where Administrators can manually set the ‘core’ scriptresource.axd or it could be automatically done by Sitefinity out of the box.
Intelligent scriptloading based on Masterpages.
By combining stuff that is used in templates you can further increase caching and minimize downloads. For instance if RadMenu and Search boxes are used in Masterpages, you can group:
Now with only 2 scriptresources we have 80% of the scripts cached throughout the website and available for longterm caching.