Search code examples
jqueryweb-applicationsjquery-1.3.2google-ajax-libraries

What are the advantages in including Jquery library from google's ajax api library?


Possible Duplicate:
Why should I use Google's CDN for jQuery?

I have seen many of the web programmers including Jquery library from google's ajax api library. Is there any real advantage in not hosting those libraries in our server other than saving 'some' space?. Is it a good habit doing so?


Solution

  • 5 Reasons Why Businesses Should Use CDN
    7 Reasons to use a Content Delivery Network

    CDN being Content Delivery Network (hosted libraries)

    Though you should always have a local cache in case a remote store fails. (The HTML5 Boilerplate demonstrates this very well):

    <!-- Grab Google CDN's jQuery, with a protocol relative URL; fall back to local if necessary -->
    <script src="//ajax.googleapis.com/ajax/libs/jquery/1.5.1/jquery.js"></script>
    <script>window.jQuery || document.write('<script src="js/libs/jquery-1.5.1.min.js">\x3C/script>')</script>