By using Google’s Ajax Libraries, you get some of the benefits of a CDN — lower latency requests no matter where your users are.
You can load a library by using Google’s AJAX loader. If you provide a partial version number, Google will dish up the latest version that matches the pattern. The example below would load v1.3.2 if called today (but so would using “1.3”). This is useful if you’re relying on features introduced by a certain version.
<script src="http://www.google.com/jsapi"></script> <script> // Load jQuery google.load("jquery", "1"); </script>
Or, you can just reference a particular version’s file directly (which will result in fewer requests).