Re:You Don't Need JQuery
by abritishguy on Tuesday December 16, 2014 @03:21PM
(#8759199)
Just use the CDN copy of jquery and it will be cached in the users browser already since so many websites already use it.
[ Parent
| on HN ]
Re:You Don't Need JQuery
by LocalPCGuy on Tuesday December 16, 2014 @11:03PM
(#8761023)
Not really, the cache-hit benefit is a myth. Too many CDNs, too many versions of jQuery in use, cache's too small...
So ..using jQuery via a CDN, depending on which you use you have a 1 in 119, or 1 in 833 chance of the user having a cached copy. http://www.i-technology.net/2013/11/the-myth-of-cdn.html
more data: http://www.stevesouders.com/blog/2013/03/18/http-archive-jqu...
There are valid reasons to use a CDN (get the scripts closer to the end user, offload the data transfer costs to the CDN provider, etc) but it isn't due to the potential for a cache hit.
> you have a 1 in 119, or 1 in 833 chance of the user having a cached copy
That statistics has assumptions on what's the most popular jQuery versions being used. It would make sense if there was real data to support that.