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

This question already has an answer here:

  • Latest jQuery version on Google's CDN 5 answers

  • Up until jQuery 1.11.1 , you could use the following URLs to get the latest version of jQuery:

  • http://code.jquery.com/jquery-latest.min.js - jQuery hosted (minified)
  • http://code.jquery.com/jquery-latest.js - jQuery hosted (uncompressed)
  • http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js - Google hosted (minified)
  • http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.js - Google hosted (uncompressed)
  • For example:

    <script src="http://code.jquery.com/jquery-latest.min.js"
            type="text/javascript"></script>
    

    However, since jQuery 1.11.1, both jQuery and Google stopped updating these URL's; they will forever be fixed at 1.11.1. There is no supported alternative URL to use. For an explanation of why this is the case, see this blog post; Don't use jquery-latest.js.

    Both hosts support https as well as http , so change the protocol as you see fit (or use a protocol relative URI)

    See also: https://developers.google.com/speed/libraries/devguide


    DO NOT USE THIS ANSWER. The URL is pointing at jQuery 1.11 (and always will).

    Credits to Basic for above snippet

    http://code.jquery.com/jquery-latest.min.js is the minified version, always up-to-date.


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

    When using http://ajax.googleapis.com/ajax/libs/jquery/1.3.1/jquery.min.js

    Cache-Control: public, max-age=31536000
    

    When using http://ajax.googleapis.com/ajax/libs/jquery/1.3/jquery.min.js

    Cache-Control: public, max-age=3600, must-revalidate, proxy-revalidate
    
    链接地址: http://www.djcxy.com/p/16182.html

    上一篇: 如何测试Chrome扩展?

    下一篇: 是否有指向Google API上“最新”jQuery库的链接?