"File failed to load: /config/MathJax.js"

111 views
Skip to first unread message

Jon Leech

unread,
Aug 10, 2015, 7:10:39 AM8/10/15
to mathja...@googlegroups.com
Recently I've started see a "failed to load /config/MathJax.js"
error on a site I maintain. It's happening in several browsers (current
versions of Chromium and Firefox on Debian Jessie) and on content that
hasn't changed in some time, such as

https://www.khronos.org/opengles/sdk/docs/man3/html/glViewport.xhtml

This page is pulling in

https://cdn.mathjax.org/mathjax/1.0-latest/MathJax.js

and after some futzing around I determined that using a more recent
version, such as 2.5-latest, seems to work around the issue. However,
I'm unclear why using the 1.0-latest script suddenly started causing
this problem, when it's been working fine since early in 2014. My hope
was to stay on a longterm stable script from the CDN.

Any ideas what's happening? Did the 1.0-latest script get updated in
a broken way? Or is there some sort of new browser behavior that cropped
up in several browsers at once to cause this to happen? There were some
issues with mixed-mode content between khronos.org and the CDN last
fall, but everything should be pulled over HTTPS now.

Thanks,
Jon

Davide P. Cervone

unread,
Aug 10, 2015, 7:38:01 AM8/10/15
to mathja...@googlegroups.com
You seem to be loading MathJax via

<script type="text/x-mathjax-config">
MathJax.Hub.Config({
MathML: {
extensions: ["content-mathml.js"]
},
tex2jax: {
inlineMath: [['$','$'], ['\\(','\\)']]
}
});
</script>
<script type="text/javascript" src="https://cdn.mathjax.org/mathjax/1.0-latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"/>

The CDN, combined configuration files, the use of the "config=" URL parameter, and separate configuration blocks with type="text/x-mathjax-config" were introduced in version 1.1. Since you are specifically requesting version 1.0, the config parameter and the configuration block will be ignored. So MathJax is trying to find its configuration via the v1.0-style config file called MathJax.js, which isn't being found. It also looks like MathJax hasn't been able to discover the location of the MathJax distribution, probably due to the https:// protocol (I think v1.0 may only have looked for http://). Also, the content-mathml extension was not introduced until v2.2, I think.

So the upshot is, this configuration could NEVER have worked for version 1.0. So I suspect that you changed how you load MathJax, and that is the source of the problem. The 1.0-latest files have not changed in years (and aren't going to).

I would not recommend using v1.0 at this point. Browsers have been updated since then, and MathJax v1.0 will not properly handle all of them. You should AT LEAST use v2.0, but even that is too old really. You say "There were some issues with mixed-mode content between khronos.org and the CDN last fall", but I don't understand what that means. What is "mixed-mode content", and what issues did you have?

Davide
> --
> You received this message because you are subscribed to the Google Groups "MathJax Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to mathjax-user...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

Jon Leech

unread,
Aug 10, 2015, 8:10:39 AM8/10/15
to mathja...@googlegroups.com
On Mon, Aug 10, 2015 at 07:38:00AM -0400, Davide P. Cervone wrote:
> So the upshot is, this configuration could NEVER have worked for version 1.0. So I suspect that you changed how you load MathJax, and that is the source of the problem. The 1.0-latest files have not changed in years (and aren't going to).

Arggh. Yes, one of my coauthors just told me he changed to
1.0-latest in a too-rapid response to a bug against the site breaking
with the most recent MathJax script
(https://www.khronos.org/bugzilla/show_bug.cgi?id=1367). My error for
posting without double-checking the revision history. Apparently we will
have to decide on some intermediate stable version between 1.0 and
-latest.

> You say "There were some issues with mixed-mode content between
> khronos.org and the CDN last fall", but I don't understand what that
> means. What is "mixed-mode content", and what issues did you have?

Loading the page via HTTP and the page loading MathJax via HTTPS (or
perhaps vice-versa, I forget), which apparently exposes some sort of
attack vector that browsers started locking down a while back. So the
pages stopped working until everything was being loaded via HTTPS.

Jon

Davide P. Cervone

unread,
Aug 10, 2015, 2:29:12 PM8/10/15
to mathja...@googlegroups.com
> So I suspect that you changed how you load MathJax, and that is the source of the problem. ...
>
> Arggh. Yes, one of my coauthors just told me he changed to
> 1.0-latest in a too-rapid response to a bug against the site breaking
> with the most recent MathJax script
> (https://www.khronos.org/bugzilla/show_bug.cgi?id=1367). My error for
> posting without double-checking the revision history.

No problem. Glad that's all it was.

> Loading the page via HTTP and the page loading MathJax via HTTPS (or
> perhaps vice-versa, I forget), which apparently exposes some sort of
> attack vector that browsers started locking down a while back.

Loading something from http:// from within a page that is https:// is the one that is dangerous, and that has been restricted in recent versions of most browsers. Loading https:// from within http:// (or https://) is not a problem, so it should always work to use https:// for MathJax in all cases.

That is not a version-specific issue, however, so changing versions shouldn't affect that. It looks like the issue in the page that is linked from the bug report is about content MathML not being processed. The content-mathml extension did change in v2.5, so that may be the source of the problem, so 2.4 might be the version you want to use for now.

Davide
Reply all
Reply to author
Forward
0 new messages