views:

25

answers:

1

Reading through documentation,

I found following:

1.9.1
1.8.4
1.8.2

A version of "1.8.2" select the obvious, fully-specified version. Specifying a version of "1.8" would select 1.8.4 since this is the highest version released in the 1.8 branch. For much the same reason, a request for "1" loads version 1.9.1, since this is the highest version released in the 1 branch. Note, these versioning semantics work the same way when using google.load and when using direct script urls.

Does that mean, that I can use something like

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

and I get latest jQuery v1.** ?

Or, would it be even possible to include:

http://ajax.googleapis.com/ajax/libs/jquery/jquery.min.js
+2  A: 

Well, just testing the two URL you gave :

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

This doesn't work : I get a 404 error.

So, it seems you must specify at least the major version number (i.e. the first digit in 1.4.2) -- which seems reasonable, as a change in major version number generally means a big change in the API (which will probably require you to change stuff in your application).


And with the first one :

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

I get jQuery 1.4.2 -- which is indeed the most recent version.


And if I test with prototype :

http://ajax.googleapis.com/ajax/libs/prototype/1/prototype.js

I get the most recent version too.

Pascal MARTIN
I should be less lazy and test it myself.. however, 25 rep for you :)
Adam Kiss
Thanks ^^ -- Actually, your question interested me *(I had never quite asked myself that question)*, so testing it was useful for me too :-)
Pascal MARTIN