4 ms·
True, there is still a perf win however since CDNs are located geographically closer to a global consumer than keeping the libs on your own box.
by starik36 6y ago
True, there is still a perf win however since CDNs are located geographically closer to a global consumer than keeping the libs on your own box.
- 1shooner 6y agoBut don't modern frontend-oriented sites/apps deploy to CDNs anyway?
- r1ch 6y agoSelf-hosting is no longer the performance drain it used to be now that HTTP/2 is a thing, as soon as the browser parses the page, the JS file is only 1 RTT away. Using a CDN for a single asset like jQuery requires a DNS lookup, TCP connection and TLS negotiation - that's 3 RTTs plus unknown latency from the user's resolver before the HTTP request is even sent. The performance difference in the single request scenario is likely negligible and the benefits of not relying on a 3rd party can outweigh the latency savings.