Tag Info

Hot answers tagged

18

There are two major benefits to using an external CDN such as Google to host jQuery: It's faster. It will be certainly be faster than your site, and probably faster than any CDN you set up yourself. It may already be cached. Lots of sites reference jQuery on Google's CDN as well, so if they visited another site with it before yours, they won't even need to ...


10

Another downside: Using a CDN allows operator of the CDN to track the sites visitors. That's why they don't cost money.


3

Using CDN(s) to shard your dependencies across many servers like this in essence represents a tradeoff between bandwidth and latency, assuming you only care about performance. I'm incidentally assuming the alternative is not simply hosting it locally, but concatenating it with a different local request - there's usually no good reason not to concatenate ...


1

Using the jQuery hosted library by Google permits to your page to be loaded faster. Indeed, the library is loaded at the same time of your page instead of after.



Only top voted, non community-wiki answers of a minimum length are eligible