banner design

Google tries to make the use JavaScript frameworks easier and faster with the Ajax Libraries API.

Main idea is hosting the JavaScript framework files on Google servers, serving them faster by Google’s fast & distributed servers, gzipping them when needed and most importantly, preventing several downloads of the same libraries by caching.

Currently supported frameworks are:

The caching mechanism may work great in the future if many websites use the Ajax Libraries API. This way if a user browsing your website, let’s say, if browsed another website using the API with jQuery, that user would have already downloaded the jQuery file and won’t need to download again on your website.

Using it is so simple. To use Prototype for example:

  • Standard inserting:

<script src="http://ajax.googleapis.com/ajax/libs/prototype/1.6.0.2/prototype.js"> </script>

  • Using Google Ajax API:

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

The official announcement can be found here.