Even though the MathJax js file will in turn probably load more things hosted on the CDN. I don’t understand why they are not putting all of the MathJax files alongside the generated HTML files. So that one does not have to rely on any CDN.
Now that I’m at my laptop I can see that you are correct on most things at least now being vendored–though it took me a while to find it since the scripts in the <body> like it’s last decade instead of in the <head> with async or defer attributes.
With first-party isolation being the standard for the last couple of years, there are no “shared caches”. A third-party CDNs might load a particular resource faster, but at the cost of user privacy & reliability. You can know, barring exceptional circumstances, that if your site loaded, it can load its own libraries. Look at the news of Cloudflare, Fastly, et al. going down and the ‘internet breaking’ because there’s been too much centralization and bad advice that all site’s need these sorts of ‘optimizations’.
Seems a bit strange. I wonder why they chose to use a CDN for that one js file.
Perhaps because MathJax support is optional? https://rust-lang.github.io/mdBook/format/mathjax.html
Even though the MathJax js file will in turn probably load more things hosted on the CDN. I don’t understand why they are not putting all of the MathJax files alongside the generated HTML files. So that one does not have to rely on any CDN.