Programatically get the jQuery version numbers hosted on Google CDN

66 Views Asked by At

Is there a service that will return the version numbers of jQuery that are hosted on Google? They are posted on their webpage, but is there a way to get that data without parsing the page text?

I want to automatically link to the latest 1.x release when scaffolding a new project (not link to the latest version on production sites).

Thanks.

1

There are 1 best solutions below

0
On BEST ANSWER

Yes, you can simply link to the "1.x" family:

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

...and parse out the version from the beginning of that file:

/*! jQuery v1.11.