The BlueClock Blog

Icon

Articles To Help You Manage Your Web Site : Web Design and Consultancy in Brussels

Google Host Javascript Libraries Free Of Charge

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 , , , , , , , , , ,

Cachefile Adds Datejs and JsUnit To Script Library

Two more JavaScript libraries have been added to CacheFile bringing the new total to 17 if you include script.aculo.us

Datejs is a small library that as its name would suggest, has a number of date parsing functions for dealing with date in human terms e.g. “Next Friday” or “6 Months Ago”.

JsUnit is a unit testing framework for JavaScript based on JUnit.

If you’re wondering what CacheFile is all about you can read my review or head on over there to have a look.

Filed under: CacheFile, How To Manage A Website, Support Articles , , , , , ,

CacheFile Expands Script Offering

CacheFile.net seems to be gaining in popularity and Jon Davis, the author of the project has to responded quickly to community feedback.

In addition to the original scripts (aflax, dojo, ext, jquery, mochikit, mootools, openajax, prototype, script.aculo.us, yui) he has added firebuglite, lightbox, msajax, qooxdoo and spry.

There’s also been a reorganisation of the some of the URIs, moves towards a using dedicated server and the adoption of the Coral Content Distribution Network to improve reliability.

This is a fast moving project so check out the latest at www.cachefile.net

The project is reliant on donations at the moment. If you can support the project please do.

Filed under: CacheFile, How To Manage A Website , , , , , , , ,

How to Save Bandwidth With CacheFile

If you use any Javascript libraries in your web projects then you’ll be interested in a new service launched yesterday by Jon Davis at www.cachefile.net

If you use a library such as jQuery you can now link directly to a jQuery file stored on the Cache File server. They keep current and previous versions of the most common libraries online and the service is available for anyone to use.

Bandwidth Savings

This idea has the great advantage of saving you and others bandwidth used in downloading javascript libraries to the client browser. This has positive commercial and efficiency implications for your hosting costs, which can’t be a bad thing.

Fast Page Loads

Even if you’re not concerned about reducing bandwidth costs, there are benefits to be had in terms of keeping page load speeds to a minimum. Again to use the example of jQuery, if the visitors to you site has already visited a site which also uses the jQuery file stored on the Cache File server, when they visit your website, the jQuery library will already be considered cached and there will be no need to download it for use on your site. This will result in faster page loads and make your web site more responsive on the first page visit.

So What’s On Offer?

The service is free and they have indicated that it will continue be free unless your site is a particularly heavy user of the service, in which case you will be approached and asked to donate to the project. They also have the option to place a usage cap on the heavy users.

The following javascript libraries are available in their current and previous versions:

  • aflax
  • dojo
  • ext
  • jquery
  • MochiKit
  • mootools
  • prototype
  • script.aculo.us
  • yui

Common images such as RSS icons are also available for use.

Their open to suggestions for other common files that they could serve and I guess some of the CSS frameworks or a CSS reset stylesheet could also be a candidate.

All Your Javascript Eggs In One Basket

There is of course a risk in handing over responsibility for serving up your javascript library files to one company for all of your sites and it is still early days. In their own words,

In BETA – The site has just gone live, we are feeling things out right now. If there is a lot of negative feedback about this project, or too little participation, we may specify an end date for this project; otherwise, this web URL and the content hosted here will be online indefinitely. Please comment in the forums!”

Let’s hope enough people get behind the project, but keep local copies of those libraries and be ready to switch the URLs just in case.

Filed under: CacheFile, How To Manage A Website, Reviews , , , , , , , , , , , , ,