Hacker News new | ask | show | jobs
by toast0 1592 days ago
> It's worth noting that even a decade ago, using a CDN for third-party libraries often failed to produce the envisioned benefits.

This always seemed like a lot of hopeful mythology. As you said, there were so many versions, and then if you start combining the modules, and the various public CDNs, it becomes a combinatorics problem that you can only when if the browser cache is enormous. But even a pretty large browser cache becomes pretty small when auto-play video is a thing and 2mb seems small for a landing page.

CDNs are certainly useful, if you can serve your content from closer to the user, that reduces latency which also increases potential bandwidth early in a connection. It's often helpful to serve content through a CDN, even if it's not cached, as reducing the latency makes a big difference (and the edge <-> origin connections can often be longer lived so that latency has less of an effect on the bandwidth available)