Google AJAX libraries CDN

Thursday, 19 November 2009

Are you using the Google AJAX libraries CDN for your applications? Google offers the simplest and fastest way to deliver the latest version of your favourite AJAX libraries over the net.

With a few lines of code you can grab your preferred libraries without having to download or host them yourself. You can even specify a specific version.

Libraries include:

I now regularly use this method to include jQuery and the jQuery UI and the speed is definitely comparable to hosting it yourself.

Here's an example of including jQuery 1.3.2:
<script type="text/javascript" src=""></script>
<script type="text/javascript">
 google.load("jquery", "1.3.2");

It also parses as valid HTML.

No need to worry about downloading another copy of jQuery just include the lines above to get the version you need.

John Resig also mentioned in the first jQuery podcast that eventually core plug-ins and add-ons will also be available across the CDN so look forward to seeing that in the near future also.

blog comments powered by Disqus