36
$\begingroup$

I found a very neat way to speed up MathJax execution times. Typically whenever I start my browser I have to load up all of these MathJax resources from the Cloudflare CDN when I first visit math.stackexchange.com:

enter image description here

As you can see this takes quite a while (>40s) on my connection here in Mumbai, and it's not the only request that will be made to Cloudflare's CDN as it will also load up other MathJax assets (like the fraktur or chalkboard fonts when needed).

Fortunately there's this addon called LocalCDN that works exactly as its name suggests: It blocks those requests to CDNs and loads up those resources locally, hence making loading up those MathJax requests almost instantaneous.

enter image description here

Not only is this better for speed (especially on that poor 4G network that my mobile phone uses with that addon installed on Firefox Nightly, bonus I get to save some Mbs of bandwidth as well and I cannot stress how much my mobile 4G browsing experience has improved since I adopted that addon) but it also protects your privacy from those spooky "free" CDNs. It will also help users for whom certain CDNs are blocked like Chinese users for whom ajax.googleapis.com is blocked and end up with an unusable website.

The addon is free and completely open source (there's even an auditing script to verify the integrity of the bundled resources) and I would encourage everyone to give it a try. Anyway hope at least someone will find this useful.


After using it for only 2 weeks these are my stats:

enter image description here

$\endgroup$
5
  • 7
    $\begingroup$ Awesome tool, thanks for sharing! $\endgroup$
    – 0xDBFB7
    Oct 5 at 23:52
  • 3
    $\begingroup$ Thank you; a remark: the above link shows it is only for Firefox. There is however, an 'unofficial' version in the Chrome Web Store. Of course, make of that what you will. $\endgroup$ Oct 7 at 2:42
  • $\begingroup$ Perhaps Decentraleyes does the same thing for Chrome? $\endgroup$ Oct 7 at 15:42
  • 2
    $\begingroup$ @TheAmplitwist LocalCDN is a fork of Decentraleyes with more coverage. Decentraleyes doesn't serve the MathJax library. $\endgroup$
    – user153330
    Oct 7 at 18:55
  • $\begingroup$ I see! Thanks for clarifying :) $\endgroup$ Oct 7 at 18:55

You must log in to answer this question.

Browse other questions tagged .