Just today or yesterday, Math SE's MathJax libraries are no longer loaded from mathjax.org but from cdnjs.cloudflare.com. mathjax.org explains that they are shutting down at the end of this month. But I was wondering, why is StackExchange not just getting a local copy instead of relying on a CloudFlare distribution? After all, it's little compared to the amount of data in StackExchange itself. Am I missing something?
2 Answers
After all, it's little compared to the amount of data in StackExchange itself.
Yes, you're right; Stack Exchange wouldn't notice if they need to serve an additional library like this. However, one of the main advantages of using a central distribution, like CloudFlare, instead of hosting it yourself, is that users are likely to visit multiple sites using the same library. If you visited another website which is using CloudFlare to host MathJax, it doesn't need to be downloaded again when you visit this site. This improves page loads and user experience, so the ultimate benefit is for the user and not for Stack Exchange itself.
-
3$\begingroup$ In addition to that would they serve it "themselves" presumably it would be put on CDN sstatic.net which is also provided by Cloudflare. $\endgroup$– quid ModApr 11, 2017 at 9:07
-
1
Well, if SE goes down, even temporarily, it wouldn't matter where the math rendering is loaded from. But if the math rendering goes down for whatever reason, you still have access to the text version and the interactivity that SE provides, along with readable LaTeX, without the pretty math rendering. So there is an advantage in that.
Also, it reduces the work load of SE servers. This makes SE a more stable and reliable site for the raw content. Different servers then can be optimized for certain uses.
Separate servers devoted to math rendering that can be used on any site helps to standardize the aesthetic, code, etc.
-
$\begingroup$ But why not host it yourself so if cloudflare goes down you still have the pretty math? $\endgroup$ Apr 14, 2017 at 12:15
-
$\begingroup$ That involves installation of software for every user that comes to this site, and others, and hopefully the same software. Not everyone is savvy in such things. $\endgroup$ Apr 14, 2017 at 19:14
-
$\begingroup$ Personally I prefer the LaTeX-to-jpeg image conversions. They only need to be compiled once into an image and stored somewhere. Re-compiled only at the first rendering of any edit of the LaTeX code. Having it done on the fly on every computer requires recompilation of the LaTeX into imagery on every computer, every time, and that is wasted computation power. $\endgroup$ Apr 14, 2017 at 19:16
https://cdnjs.cloudflare.com
and add an ABE ruleSite https://cdnjs.cloudflare.com/ajax/libs/mathjax/* Anonymize Site cdnjs.cloudflare.com Deny
(with line breaks before uppercase letters). $\endgroup$