Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

>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



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.


Self-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.


But don't modern frontend-oriented sites/apps deploy to CDNs anyway?




Consider applying for YC's Fall 2026 batch! Applications are open till July 27.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: