Friday, June 1, 2012

Is there a link to the "latest' jquery library on Google APIs?

I use the following for a jquery link in my <script> tags:

Just wondered if anyone had discovered whether there's a link to the "latest" version:

Something like the following (which doesn't work):

(Obviously not necessarily a great plan to link your code to potentially changing libraries but useful in development)

Source: Tips4all


  1. You can use:

    To get the most recent version in the 1.x.x family or you could use:

    To get the most recent version in the 1.7.x family.


    In case anyone is interested Microsoft is also hosting jquery:

    EDIT 2:

    jQuery is now hosting a version on their CDN:

    EDIT 3:

    A list of the latest libraries and frameworks (including download links) can be found at


    this is the minified version, always up-to-date

  3. Be aware that caching headers are different when you use "direct" vs. "latest" link from google.

    When using

    Cache-Control: public, max-age=31536000

    When using

    Cache-Control: public, max-age=3600, must-revalidate, proxy-revalidate

  4. Not for nothing, but you shouldn't just automatically use the latest library. If they release the newest library tomorrow and it breaks some of your scripts, you are SOL but if you use the library you used to develop the scripts, you will ensure they will work.

  5. Yes there is.

  6. If you do this you always have the latest versions.

    <script type="text/javascript" src=""></script>
    <script type="text/javascript">
    google.load("jquery", "1");
    //google.load("jqueryui", "1");
    //google.load("swfobject", "1");

    Then call it with:

    google.setOnLoadCallback(function(){jQuery(function($) {

    // Enter your code block here


  7. No. There isn't..

    But, for development there is such a link on the jQuery code site.

  8. Google doesn't allow the reference of jQuery's latest version.
    When jQuery changes its major version, then you'll have to change the link.
    Media Temple does. Here are the links:
    - Development version - Production (Minified) version.

    These links always refer to the latest versions.

  9. jQuery also doesn't allow you to call their latest file over SSL, a consideration if you want to use jQuery in a shopping cart etc.


    <script type="text/javascript" src=""></script>

    will give you a security error.

    Google's API will let you call over SSL:

    <script type="text/javascript" src=""></script>
    <script type="text/javascript">
    google.load("jquery", "1.7");

  10. Here's a page where you can find links to the latest versions of jQuery, jQueryUI and Themes for Google and Microsoft CDN's. This page automatically updates with the latest links from the CDN.