What version of jQuery reference CDN?

I want to use Google's jQuery CDN so that the user has the best opportunity to already have a cached version of jQuery.

Now my question is: how to determine what is the best version of jQuery in order to maximize the likelihood that the user already has a cached version?

Should I reference the latest jQuery? Or the most popular version?

For example, the latest version is currently jQuery 1.9.0, which was just released yesterday. But most sites probably don't yet link to it, so would I be better off using 1.8.3?

I think I can just look at the source code for Google or other popular websites and see which jQuery they link to, but I can not find the jQuery link when viewing the source.

+6
source share
3 answers

I would take advantage of the latest release after rigorous testing on your site.

Any performance improvement that you received today using an older version will be lost in a short time, as other sites will switch to the new version.

Looking at other sites is not very useful, I just tried a few. Releases are everywhere, Google, Twitter and Facebook don't use jQuery (at least not by name), and stackoverflow uses 1.7.1

+4
source

Here's a chart of market share: http://w3techs.com/technologies/details/js-jquery/1/all 1.7 seems to be taking the cake ... for now. You can see the 1.7.x statistics by clicking on the version: http://w3techs.com/technologies/details/js-jquery/1.7/all

+3
source

Other sites do not seem to be advancing to new releases very quickly. Below is a generic link from w3techs for ALL versions of jquery that show this. (It has been months since 2.0). And this is important for caching. You would like your visitors to visit the most popular sites, probably to host the same version. Althoug is not permanent, and you might want to consider things more in relation to other things. The link is also a good future reference for this issue. You can click deeper each time.

http://w3techs.com/technologies/details/js-jquery/all/all

+3
source

All Articles