CDNs and to CDN or not to CDN

September 21, 2022

A CDN (Content Delivery Network) is basically the idea of getting someone else to host your content, which could be anything really.

After reading up on the subject of whether or not to use a CDN to serve third pary javascript libraries (plus css), it seems it boils down to the following.

For

Against

The conclusion

For now, I will be using Cloudflare’s CDN cdnjs for serving jquery, bootstrap and mathjax while using abovementioned SRI to ensure integrity of third party files. I plan to add a fallback to locally served libraries, mostly to stay independent and for users with third party javascript blocked. Fonts are served locally to avoid potential tracking by Google.

Public CDNs Are Useless and Dangerous plus discussion on Hacker News.

Remote code execution in cdnjs of Cloudflare plus discussion on Hacker News.

The CDN is Dead, Long Live the CDN! - Cache Partitioning in Firefox and Chrome.