Google's New AJAX Distribution Network

In yet another interesting API move, Google has just released a simple but useful API for managing AJAX APIs called the AJAX Libraries API (our new API profile). The goal is to help simplify the lives of Ajax developers by providing a centralized, flexible but consistent way to access many of the most commonly used Ajax libraries. In effect Google becomes a content distribution network for these JavaScript libraries. The first set of libraries supported include:

For some of the rationale, their announcement notes that:

Google engineers spend a lot of time working on speeding up their Web applications. Performance is a key factor for our teams, and we recognize how important it is for the entire Web. When you take a look at the effort that it takes to setup work that should be simple, such as caching shared JavaScript libraries, you quickly realize that the Web could be faster than it currently is.

The AJAX Libraries API is an attempt to make Web applications faster for developers in simple ways:

  • Developers won't have to worry about getting caching setup correctly, as we will do that for you
  • If another application uses the same library (much more likely), they there is a much better chance that it will be already caching on the users machine
  • The network and bandwidth of the users systems will not be taxed.

One of the useful features is "a smart versioning feature that allows your application to specify a desired version with as much precision as it needs" where for example "Specifying a version of "1.8.2" will select the obvious version. This is because a fully specified version was used. Specifying a version of "1.8" would select version 1.8.4 since this is the highest versioned release in the 1.8 branch. For much the same reason, a request for "1" will end up loading version 1.9.1."

You won't hear a lot of talk about mashups built on this API but it might get a lot of under-the-covers use by Ajax developers.

John Musser

Comments (4)


The libs are relatively small - it is much better to keep them locally. Obviously, locally they load much faster than from G*****. Moreover, you avoid privacy troubles with G*****!