Nick Pierpoint Nick Pierpoint - 5 months ago 17
jQuery Question

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

I use the following for a jQuery link in my

<script>
tags:

http://ajax.googleapis.com/ajax/libs/jquery/1.2.6/jquery.js


Is there a link to the "latest" version? Something like the following (which doesn't work):

http://ajax.googleapis.com/ajax/libs/jquery/latest/jquery.js


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

Answer

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

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 URLs; 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