We use prototype.js and scriptaculous for a number of our sites and applications – they provide great foundations with which to build advanced javascript applications. However they can be fairly large and take a while to download.

As I’ve previously mentioned on this blog, you can get pre-shrunk versions of both prototype and scriptaculous which significantly reduce the time it takes for your users to download the libraries.

However in addition to this, you can now use Google’s servers to provide users with a central location for the libraries which allows them be downloaded and SHARED between your applications (or other’s applications). This is a huge advantage as it allows everyone to share the same downloaded libraries from a single location hosted for free by Google, and means your users have a drastically reduced load time as they are all pre-shrunk.

How do you use these libraries? You use the Google google script api like this:

<script src="http://www.google.com/jsapi"></script>
<script>google.load("prototype", "1.6.0.2");</script>

The above command will load the prototype library version 1.6.0.2 in pre-shrunk form.  Further information is available from Google’s API site.