Re:You Don't Need JQuery
by Pxtl on Tuesday December 16, 2014 @02:56PM
(#8759015)
Yeah, the problem with jQuery is all that other stuff that nobody uses and backwards compatibility with browsers nobody supports. A "lite" jQuery with the same familiar API but a stripped-down featureset for higher performance and smaller size would be nice.
[ Parent
| on HN ]
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.
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.
Zepto might be what you are looking for.
You're aware of jQuery custom builds? Leave out what you don't use. It's in the README file.