4 ms·
If you link to jQuery on Google's CDN, changes are pretty high that it's already cached by the browser.
by Yaggo 16y ago
If you link to jQuery on Google's CDN, changes are pretty high that it's already cached by the browser.
- coderdude 16y agoYes. The minified version is much smaller and after gzipping it's around 20kb or so. When using a CDN there is a chance that it's cached. I'm just stating the obvious here. Either way, the 7000 lines of JS that comprise jQuery are a lot and this seems like an alternative if you just need that single piece of functionality. Linking to Google's CDN is not without its own pitfalls though. I believe there have been discussions on HN in the past about this.
- latortuga 16y agoNot over SSL.
- tomstuart 16y agoSee http://hoisie.com/post/yes_browsers_do_cache_ssl_resources__so_please_use_googles_cdn http://hoisie.com/post/yes_browsers_do_cache_ssl_resources__...: This is a completely incorrect statement. All browsers cache SSL content, as long as you specify the correct Cache-Control headers. A simple curl request reveals that jquery served from Google's CDN has Cache-Control public.
- latortuga 16y agoThank you for this!