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