Speed up your Apps with Google’s AJAX Libraries

If you use an open source JavaScript library like jQuery, Mootools or Prototype on your site, you’re likely hosting the .js files on your server and calling them directly in your pages. This approach is good, but there’s an even better way of getting your JavaScript libraries served. Google offers what it calls, Google AJAX Libraries, a content delivery network (CDN) to serve popular JavaScript libraries from its data centers. By having Google host and serve your JavaScript, you can reap the following benefits:

  1. Saves your bandwidth – You can save up to 50Kb per visitor in bandwidth by using Google’s CDN.
  2. Decrease latency – your visitors will be served by a CDN server closest to their physical location)
  3. Better caching– a visitor who accessed a previous site using Google’s hosted JS is likely to have a copy in his cache)

There’s also a handy online tool at Scriptsrc.net that allows you to easily copy and paste the latest version of your JavaScript library for insertion on your page.