4 ms·
I take your point, the study demonstrates the problem. However I would counter that the problem is that people are doing it wrong. They shouldn't be linking to
by nextw33k 12y ago
I take your point, the study demonstrates the problem.
However I would counter that the problem is that people are doing it wrong. They shouldn't be linking to a specific minor or patch version, just linking to the major version they want:
http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js
Which would mean you'd get nearly a 13% chance of a hit.
Plus the maths didn't really (and couldn't really) factor in the popularity of sites. If I use the same jQuery as Google's homepage (which they don't but just hypothetically imagine they did) then they'd show up as one data point in the analysis. However the vast majority of web users would then have that in their cache.
I still believe JavaScript CDN used correctly, has the potential to offer improvements. It's just unfortunate that people are doing it wrong.