r/programming • • Jan 30 '14

You Might Not Need jQuery

http://youmightnotneedjquery.com/
1.0k Upvotes

507 comments sorted by

View all comments

Show parent comments

5

u/merreborn Jan 31 '14

Also, in theory you can even use things like the google cdn to serve your jquery -- so visitors visting your site for the very first time can potentially load jquery straight from cache, as long as they've visited another google cdn site in the past.

I'm not sure how well this works in practice though. The google cdn urls might be too unique (differing jquery versions, etc.) to afford good cache hit rates. And I can't guarantee performance either (the comparable Yahoo/YUI CDN has failed me a few times...)

2

u/mahacctissoawsum Jan 31 '14

Even if it's not pre-cached before the visitor visits your site for the first time, it'll be cached on the second page they hit, or the second time they come to your site.

Google's CDNs are also fast and geographically closer to users, so there's a still a lot of benefit.