Using Google CDN to Load jQuery
, Sunday, October 4, 2009Google offers the possiblity to link some JavaScript libraries like jQuery directly over Google CDN. But what is the advantage of loading it directly from then loading it from the own server? There are at least 3 advantages:
- Saving bandwith
- Allows you to download script in parallel
- Chance that the file is already in the cache is higher. Also other sides use this file.
The link for jQuery 1.7 is for example:
<script type="text/javascript"
src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"></script>
There exist also the possiblity to use the Google AJAX Libraries to load it. But the direct link is simpler and faster in most cases.


