5 ms·
Probably 4kB more than loading jQuery from cache :)
by colinm 13y ago
Probably 4kB more than loading jQuery from cache :)
- nawitus 13y agoThat was what I was thinking. What's the selling point since jQuery is already cached?
- rschmitty 13y agoAt one time jquery wasnt cached... and when you want to use a new version of jquery, there goes your cache anyways. Doesnt seem like a really big argument against, especially considering the size of the library for the first non-cache hit
- ricardobeat 13y agoOn average > 50% of visitors have an empty cache.
- dclowd9901 13y agoAre people really referencing jquery from other servers in production environments?
- adventured 13y agoYes, it's extremely common to call jQuery from, for example, Google's googleapis.com domain. Here's a quick sampling from a random group of top sites: stackoverflow.com (googleapis.com), kickstarter.com (googleapis.com), cnn.com (their own cdn), businessinsider.com (jquery.com), foxnews.com (their own cdn), nbcnews.com (aspnetcdn.com), espn.com (espncdn.com), tumblr.com (secure.assets.tumblr.com), lastfm.com (googleapis.com), lyricsmode.com (googleapis.com), reference.com (sfdict.com, cdn for ask etc), qz.com (googleapis.com), theverge.com (googleapis.com), ehow.com (googleapis.com), wikia.com (googleapis.com), chacha.com (googleapis.com)
- toble 13y agoJust a passing tinfoil comment... Google has so many fingers in the analytics pie, if you're not being recorded by Adsense or Analytics, then there's always CDN. No idea if it's all linked up, but it means that using alternative search engines doesn't really matter if you still visit Google-enhanced destinations.
- eps 13y agoOf course it's all linked up, including other freebies such as Google Fonts. Why else would they be offering it for free.
- shocks 13y agoIf you're not paying for it then you are the product.
- toble 13y agoIf that's the case then maybe it would be better for society if we all started self hosted these sorts of resources. Longer load times, more bandwidth usage but better privacy for the public.
- amalag 13y agohttp://cdnjs.com/ http://cdnjs.com/
- EzGraphs 13y agoSee https://en.wikipedia.org/wiki/Content_delivery_network https://en.wikipedia.org/wiki/Content_delivery_network. Use of these (to serve static content) reduces your server traffic/load and gives a faster response times to users in different geographical regions.
- dclowd9901 13y agoI definitely understand the benefit. I also understand the very serious drawbacks of not hosting content that you own. Compared to an initial load time that borders on completely negligible, I'd rather guarantee safety of user information and not having downtime coincide with the shared cdn.
- mtrimpe 13y agoLet's hope this one will soon just be a cache hit as well then ;)
- leandono 13y agoYep. But with jQuery, the browser parse 91kb of JS, this is the difference...
- youngtaff 13y agoSort of, many modern JS engines use lazy parsing, so don't actually parse the contents of a function until it's needed.