Question

I expect these two links to point to the latest version of jQuery, version 1.11.0.

The code.jquery.com link points to 1.10.2 and the Google one points to 1.9.1.

Can anyone explain why, or indicate something which I might be doing wrong? I have tried clearing my browser cache and even tried the links on other machines.

Était-ce utile?

La solution

Use this for latest version from google (although I personally don't recommend you to use latest version):

<script src="//ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script>

Why does it point to 1.9.1?

The latest version of jQuery may not be compatible with the existing plugins/code on the site. Version updating should be an intentional decision. The latest version has a very short max-age=3600 compares to the specific version of max-age=31536000, which means you won't get the benefits of long-term caching.

Source

So, Google doesn't waste its resources unnecessarily. You'll need to manually upgrade the URL to the latest.

Autres conseils

Not a good idea to use latest version of jQuery.

But if you really want that specific version, it's at:

<script src="//ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script>
Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top