Performance remains top of the web app agenda with browser vendors continuing to slug it out with claims of shaving milliseconds off JavaScript performance in each new release. Meanwhile the developers of JavaScript libraries are also waging a performance war which we’ll all benefit from in the long run as web apps become more sophisticated.
But all of this is focussed on how quickly JavaScript runs in the browser and in the case of JavaScript libraries, how quickly they run, once they have been downloaded to the browser. And that’s the key point. There is still an easy performance gain to be had by eliminating the time and resources required to download these libraries from your server to the client’s browser.
So Google have begun hosting a selection of the most commonly used JavaScript libraries so that over time, they will be cached on a lot of users’ machines.
At present, if I visit a shopping web site that uses jQuery and I then visit a travel information web site that also uses jQuery then my browser will have to download the jQuery library once when I visit the shopping site and then again when I visit the travel information site even though both sites are using the same file.
If both sites download the jQuery library from a common source, in this case Google, then the file only has to be downloaded once and is available for any other sites that use jQuery as well.
By using this method, you’ll take some of the pressure off your own web server, save a bit of bandwidth and make initial performance of your site better. The latter is something that your visitors using dial up or in countries with slow connectivity will definitely appreciate.
At the moment, the libraries provided are:
- dojo
- jQuery
- MooTools
- prototype
- script.aculo.us
Google will be expanding this selection in future and its success is dependent on uptake.
You can see Dion Almaer annouce it below and full details are at code.google.com/apis/ajaxlibs/documentation/
Filed under: CacheFile, Free Fridays, Free Software, How To Manage A Website, Web Browsers, Web Standards, Accessibility and Best Practice , ajax, ajaxapi, bandwidth, dojo, hosting, javascript, jquery, mootools, prototype, script.aculo.us
Recent Comments