4 ms·
What are those benefits of pulling from a central CDN? I've never understood that, and always hated the idea of yet another point of failure. Especially for som
by colinbartlett 12y ago
What are those benefits of pulling from a central CDN? I've never understood that, and always hated the idea of yet another point of failure. Especially for something so easy to host yourself.
- cheald 12y agoIf everyone references the CDN copy, then most clients will already have the library cached and don't have to download it separately. Personally, I self-host every dependency I possibly can, specifically because I don't want my website's functionality, performance, or security to depend on a third party insofar as I possibly can.
- corobo 12y agoSupposedly it's because many sites use jQuery et al so it's already cached in the user's browser. In reality minified bootstrap & jquery scripts/css combined is usually faster than the rest of the site to load anyway, no big deal to just host it locally
- leeber 12y agoThis sums it up nicely: http://encosia.com/3-reasons-why-you-should-let-google-host-jquery-for-you/ http://encosia.com/3-reasons-why-you-should-let-google-host-...
- eloisant 12y agoI know the theoretical reasons, but I'm not sure it makes such a big difference in practice.
- aranjedeath 12y agoThe cache-sharing other users are citing is useful, but ultimately not the most-useful part. The most useful feature is the fact that, given tons of sites are now serving global audiences, you as the site owner/administrator no longer have to deal with provisioning servers to datacenters or infrastructure of any sort (for these static resources) nearer to your customers. If you optimize by putting all of these external links into <head> and shipping that bit of your page out earlier than it takes to generate the rest of the page, you'll see pretty solid performance gains for anyone not where YOU are (near your likely us/eu based servers). At some point in optimization the speed of light becomes the hard barrier, and not caching concerns.