Ajax Libraries API: Google is your CDN
The big news out of Google this week this week’s Google’s I/O gathering is yesterday’s release of Google’s AJAX Libraries API. With this move, Google becomes a content delivery network (CDN) for several popular JavaScript libraries.
Why should you care? Speed. Using Google as a framework repository means:
- you can take advantage of Google’s global content distribution
- there is a greater likelihood of scripts being cached on a user’s computer
Those are two key factors in your site’s performance.
Google has also committed itself to managing and hosting multiple versions of these libraries, including bug fixes.
We work with the key stake holders for these libraries to make sure that the latest stable versions of their work get into our system as they are released. Once we host a release of a given library, we are committed to hosting that release indefinitely.
The search giant has also made it easy to switch versions with its “smart versioning” system that lets you load either a major or a minor version of your preferred library. To date, it supports:
- jQuery 1.2.3 and 1.2.6
- prototype 1.6.0.2
- script.aculo.us 1.8.1 (requires prototype)
- mootools 1.11
- dojo 1.1.1
Google’s offer to host and serve these libraries is similar to what Yahoo offers users of its User Interface library. Google, however, is adding these third-party libraries to its API family.
Keep in mind that Ajax Libraries API was designed to smooth integration between these libraries and other Google APIs. Therefore you’ll need a Google Account and a Google API key. Whether or not you plan to use the search or maps APIs may determine whether you’ll want to use this one.
What do you think about Google’s move? Is this something you plan to take advantage of? Have your say in the comments.
Related posts
- JavaScript Holy War: What’s your favorite framework or toolkit?
- Must have HTML, CSS and JavaScript books?
- Recommended viewing: Maintainable Javascript
- Recommended viewing: “Best Practices in Javascript Library Design”
Elsewhere
- Google’s Ajax library API documentation
- 14 Rules for Faster-Loading Web Sites
- Free Hosting of YUI Files from Yahoo!
- Keep JavaScript Simple by Peter-Paul Koch on Digital Web















