Activity Stream
48,167 MEMBERS
6943 ONLINE
besthostingforums On YouTube Subscribe to our Newsletter besthostingforums On Twitter besthostingforums On Facebook besthostingforums On facebook groups

Results 1 to 6 of 6
  1.     
    #1
    Member
    Website's:
    litewarez.net litewarez.com triniwarez.com

    Default 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

    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
    Join Litewarez.net today and become apart of the community.
    Unique | Clean | Advanced (All with you in mind)
    Downloads | Webmasters


    Notifications,Forum,Chat,Community all at Litewarez Webmasters


  2.   Sponsored Links

  3.     
    #2
    Respected Developer
    Website's:
    PlatinumW.org NexusDDL.com HD-United.org CheckLinks.org FLVD.org

  4.     
    #3
    Member
    Website's:
    litewarez.net litewarez.com triniwarez.com
    yea its not about keeping it short.. its about having 11 different frameworks avaialable at ease and speed... also by using the google object you have the functionality of intergreating the google services with ease such as youtube embeding/google earth maps with or without maps browser plugin and you also have a range of services outside of the google structure

    Here are just some of the API's you can use with the one JavaScript include
    Code: 
    Google Maps
    Google AJAX Search
    Google AJAX Feeds
    Google AJAX Language
    Google Data API's
    Google Earth
    Google Visualization
    Google Friend Connect
    Not to mention al the Javascript Framw Works you can call
    Code: 
    jQuery
    jQuery UI
    Prototype
    script.aculo.us
    MooTools
    Dojo
    SWFObject
    Yahoo! User Interface Library (YUI)
    Ext Core
    Chrome Frame
    I think i would be better if people started to use the CDN for ease.
    Join Litewarez.net today and become apart of the community.
    Unique | Clean | Advanced (All with you in mind)
    Downloads | Webmasters


    Notifications,Forum,Chat,Community all at Litewarez Webmasters


  5.     
    #4
    Respected Developer
    Website's:
    PlatinumW.org NexusDDL.com HD-United.org CheckLinks.org FLVD.org
    If you are using different frameworks on your page, umm, something is certainly wrong with you.

  6.     
    #5
    Member
    yui is also pretty good
    abd vBulletin has default support for calling some javascripts from Google and Yahoo
    Coding Horror Fan
    I don't read PM's frequently .

  7.     
    #6
    Member
    Website's:
    litewarez.net litewarez.com triniwarez.com
    yea yui is included with the Google CDN
    Join Litewarez.net today and become apart of the community.
    Unique | Clean | Advanced (All with you in mind)
    Downloads | Webmasters


    Notifications,Forum,Chat,Community all at Litewarez Webmasters


Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 0
    Last Post: 25th Feb 2014, 12:23 PM
  2. Replies: 16
    Last Post: 9th Jul 2012, 07:22 AM
  3. is this stat good enough to start Google AdSence in my blog?
    By Breaking Bad in forum General Discussion
    Replies: 11
    Last Post: 22nd Dec 2011, 04:08 PM
  4. Replies: 1
    Last Post: 31st May 2011, 10:46 AM

Tags for this Thread

BE SOCIAL