A new service from google for including the jQuery library is the Google Content Delivery Network (CDN). A Content Delivery Network is a network of servers that serve content in a fast and scalable manner, distributed geographically, each request being served by the closest server in the network.

So, instead of hosting the jQuery files on our own web server we have the option of letting Google serve the jQuery file. You benefit from the speed and reliability of Google’s vast infrastructure, with the added bonus of the option to always use the latest version of jQuery and that because of the use of this service by many webpages the file will be cached (this means better speed for the users).

This is how to include:

  1. <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js" type="text/javascript"></script>