Local fallback for MathJax CDN

121 views
Skip to first unread message

simon.woodhead

unread,
Mar 13, 2012, 9:56:03 AM3/13/12
to mathja...@googlegroups.com
Hi all,

I have seen this trick used for loading jQuery from a CDN with local fallback and thought it might be useful for my MathJax pages. I really didn't want to include all the image fonts locally so I decided I would use the CDN with a local fallback which didn't support image fonts. 

<!-- MathJax: Fall back to local if CDN offline but local image fonts are not supported (saves >100MB) -->
<script>window.MathJax || document.write('<script type="text/x-mathjax-config">MathJax.Hub.Config({"HTML-CSS":{imageFont:null}});<\/script><script src="<<PATH_TO_YOUR_LOCAL_MATHJAX>>MathJax.js?config=TeX-AMS_HTML-full"><\/script>')</script>

The CDN seems to be down just at the moment which is what prompted me to share this. I have not yet updated to Version 2.0, this code definitely worked on Version 1.1. If it is no longer correct please let me know.

Regards,

Simon

Peter Krautzberger

unread,
Mar 13, 2012, 11:24:20 AM3/13/12
to mathja...@googlegroups.com
Thanks for sharing this, Simon.

There's a temporary workaround to use http://s3.amazonaws.com/mathjax/latest/MathJax.js instead of the usual CDN.

Peter.
Reply all
Reply to author
Forward
0 new messages