Hacker News new | past | comments | ask | show | jobs | submit login

There are approximately 5 million different CDNs hosting different versions of jQuery. Cache hits are actually quite low.



I have a small website that uses jQuery, but I by default point to the Google-hosted version (with a fallback to my own site if that fails), but I also use an older version that's a little over half the size of the current version.

What I'd like to see, however, is a way of trimming down jQuery to only include the functions I actually use. I only use two functions out of the whole library IIRC, so I really don't need to load the whole thing. Maybe one day when I have some spare time and other projects out of the way I'll try stripping those functions out of jQuery and just hosting them locally.


Three popular ones is not "approximately 5 million": Google, cdnjs, MaxCDN.


even the sites using one of these 3 CDNs probably specify aa specific minor version of jQuery from this list http://code.jquery.com/jquery/

(OK, so I doubt many sites are specifying the beta or uncompressed versions, but there's still a pretty good chance that somebody hasn't downloaded the relevant version from the relevant CDN recently enough for it to be in their cache, especially if they're browsing on their phone)


Source? And even then it's ~83KB vs the average page of ~2250K.




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: