4 ms·
>most likely already cached from CDN. I don't believe any major browser allows sites to share 3rd party caches anymore. Previous HN discussion: https://news.y
by 1shooner 6y ago
>most likely already cached from CDN.
I don't believe any major browser allows sites to share 3rd party caches anymore.
Previous HN discussion: https://news.ycombinator.com/item?id=24894135 https://news.ycombinator.com/item?id=24894135
- starik36 6y agoTrue, 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.