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

You seem to assume that jquery isn’t already cached by the client. Given the widespread usage, while granted may be shrinking, the “bundle” may never be downloaded again; Assuming that’s the case, the download is moot, and more favorable, verses the SPA with some cache busting mechanism (that may release once per week or once per hour).



This is very rarely true, and often cited. Too many sources to get reasonable gains for cached jQuery. There was a good article breaking down exactly why this is a few years back. Mobile but someone else can probably share.


As cited elsewhere in this thread, jQuery is in use on >75% of the web. The only way you don't have jQuery cached is if you don't regularly use the web.


Which version cached?


And from which CDN?


There are only a handful of major CDNs


Other sites' use of jQuery only helps if everyone is loading the same URL, which they're not. There are too many versions in too many places. I think I know the article they were thinking of, where someone tested how common it was for different sites to load libraries from the same place, it was not great.

jQuery.com doesn't mention linking to it, only downloading, and references to their CDN and other CDNs is at the bottom of their Download page. They focus on the download option probably because people generally want to have more control of their sites and would rather have "their" jQuery file be loaded from the same CDN as their site's other assets.


Actually I did not have in mind the download time, but the time required to parse and JIT compile the jQuery code.

This was, I don't remember, something like 30 or 100 ms, for jQuery — on my core i7 laptop (according to Chrome Dev Tools). Might mean ... maybe 200 ms? half a second? on an a few years mobile phone.




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

Search: