1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Google.load() vs Direct Linking?

Discussion in 'Off Topic' started by James, Jan 15, 2011.

  1. James

    James Well-Known Member

    I know that Google Load allows you to load libraries/frameworks from Google's CDN using the google.code fuction, such as:
     google.load("jquery", "1.4.4");
    However, what gives the above code an advantage over direct linking from Google's CDN? Such as:
    <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.4.4/jquery.min.js"></script>
    If I use the second example. I don't have to import the original google script that allows me to use google.load(), thus saving an extra JS file.

    What're the advantages of using google.load() rather than <script>, if any?

Share This Page