Speeding Up jQuery Javascript & CSS Download Times


News: Speeding Up jQuery Javascript & CSS Download Times

  1. Now-days, jQuery are becoming so popular in client-side of web development. jQuery is a cross-browser JavaScript library designed to simplify the client-side scripting of HTMLjQuery itself is composed by "one" file called jquery-x.x.x.min.js. With only one Javascript there is no performance problem. But with jQuery has been appeared some "addons/plugins" that uses this library. An example could be jQueryUI http://jqueryui.com/ but more can be found at http://plugins.jquery.com/. Each of these addons contain their own Javascript file. For example jQueryUI contains apart fromjQuery file, jquery-ui-x.x.x.custom.min.js and one CSS file, so in this case in a web page twoJavascript and a CSS elements are defined. As more and more extensions are used, moreJavascript files are required. And more scripts imply more connections to server, so for example if three Scripts and one CSS are defined, four connections from browser to server are required.

    Because of these amounts of connections, downloading time is increased; content negotiation and the fact that normally there will be only two concurrent connections to the same host, produces an overhead that results in a long page loading time. For example, it is faster to serve a 8KB script file than  eight of 1KB.

    Read Full Post

  2. YUI fixes this[ Go to top ]

    Try YUI 3, it comes out of the box with a cloud supported loader infrastructure which automatically aggregates requests into smart "combo-requests" while still allowing you to roll your own, if you think you know better.