For those who are using Jquery/MooTools/script.aculo.us etc, you can use google to load your frameworks with ease, the benifits of using the CDN is
  • Less bandwidth
  • Faster loading
  • 1 Javascript call


What the CDN Does is provide you with a framework you can use to load all your other framworks. examples below

If you wanted to use just jQuery you can use the following

PHP Code: 
/*Firstly pull the main library from Google, this is al you need to load*/
<script src="http://www.google.com/jsapi"></script>

/*Then you can tell the library what frameworks you wish to use*/
google.load("jquery", "1");
/*The second parameter is the version you wish to use. by setting to 1, this will load the latest version in the 1.x range*/

/* Google offer a neat callback function to load when document is ready*/
google.setOnLoadCallback(myCallBackFunc());

/*No heres an example callback function*/
function myCallBackFunc(){
   console.log("myCallBackFunc as been called!");
   
   /*Heres just an example usage from jQuery*/
   $.getJSON(
      "http://ajax.googleapis.com/ajax/services/search/web?q=google&v=1.0&callback=?",
      // on search completion, process the results
      function (data) {
        if (data.responseData.results &&
            data.responseData.results.length > 0) {
          var results = data.responseData.results;
          
          for (var i=0; i < results.length; i++) {
            // Display each result however you wish
            alert(results[i].titleNoFormatting);
          }    
        }
   });

if your user has already used a site that uses the CDN, the libary will already have been loaded into there catch meaning it wont even need to load again,

also your versions will always be updated aswell

Heres some links
http://code.google.com/apis/ajaxlibs/
http://code.google.com/apis/ajaxlibs...ex.html#jquery
http://code.google.com/apis/ajax/pla...braries#jquery

I hope you can see that using the was will be much faster for your users and less bandwidth for yourself

peace
litewarez Reviewed by litewarez on . Start using Google CDN for your javasripts ! For those who are using Jquery/MooTools/script.aculo.us etc, you can use google to load your frameworks with ease, the benifits of using the CDN is Less bandwidth Faster loading 1 Javascript call What the CDN Does is provide you with a framework you can use to load all your other framworks. examples below If you wanted to use just jQuery you can use the following Rating: 5