Pros and Cons of using latest jQuery CDN

Posted by & filed under Javascript.

It is not a good idea to use the following CDN jQuery in your live (deployed) sites.

http://code.jquery.com/jquery-latest.min.js

This always serves the latest version. If you are using jQuery plugins written by yourself or 3rd party you can find that these plugins break when a new release of jQuery is pushed.

This happened to me recently when jQuery went to 1.9.0 and the jquery cycle plugin broke. It is safer to use an explicit version like this:

http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js

The advantage of using the latest version is that any new methods are available when you go back to your deployed site to add functionality.

The downside is that your site could break and unless you are regularly a visitor you might find it has been broken for sometime!

Leave a Reply

  • (will not be published)

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

Bitnami