This past week has been a tortuous journey through the swampland of MathJax and Internet Explorer, turning unknown unknowns to known unknowns to known knowns and back again. If you haven’t heard of MathJax before, you just need to know that it powers all the beautiful math in Khan Academy’s exercises, and it doesn’t always work in IE.
The latest hypothesis is that folks using Windows with guest accounts using Internet Explorer will NOT be able to use MathJax. It boils down to the fact that request headers do not include:
Accept-Encoding: gzip, deflate
…while the response headers do include:
Content-Encoding: gzip
I don’t understand why Internet Explorer is being difficult only for guest accounts, nor do I understand why MathJax isn’t accommodating. I also don’t get why Internet Explorer insists on:
HTTP/1.0
…when I have very clearly checked the “Use HTTP 1.1″ checkbox and pressed the required number of “OK” buttons to indicate that I really know what I’m doing.
We’d seen a few “Problems aren’t showing up” bug reports, but since we always tested the site with an administrator account, we never encountered this particular flurry of doom. A bug report from a helpful user saved the day. (THANK YOU, helpful user, if you are reading this! Also, THANK YOU @mrawde.) By the way, this info is partly described in this thread, but of course fate didn’t let me find that discussion until the very end.
Out of completeness, here are some earlier (and still valid) ideas of why MathJax was not able to execute its tagline of “Beautiful math in all browsers.”
- The most relevant part of the MathJax FAQ on IE was that the font download setting should be enabled (for web fonts to work). Since MathJax will wait 5 seconds before considering the web fonts to have timed out, I thought people might’ve been impatiently reporting bugs when the image fonts were already on their way and going to appear imminently. Now, if you’re an IE user who hasn’t enabled this setting, you’ll (eventually…) get a message telling you to do so.
- A few users had also reported unresponsive script errors, and the only way I could reproduce that was to throttle my Internet (it turns out that our flaky office network is reasonably fast… when it’s not down). It seemed like MathJax wanted to Do Stuff when the files hadn’t completely loaded, so now MathJax just quits completely after a slightly more forgiving timeout. This doesn’t fix the problem for people whose Internet consists of butterflies passing messages through the rhythmic flapping of their wings, but at least their browsers don’t crash and now they get a message telling them to refresh and hope for lower latency.
- Last but not least, school networks tend to block the Internet, including benevolent domains like mathjax.org. We now check whether you’re blocked from accessing MathJax’s favicon, and, if necessary, we tell you to ask a “network administrator” to unblock appropriately.
The highlight of this fearless adventure was that I finally downloaded Charles, and I had a lot of fun learning how to use it. It was not so fun increasing my network latency and working with Internet Explorer + its “developer tools” in Fusion. It was also not so helpful that documentation would mention “15 seconds” but the real unit in code was milliseconds, or that font warning extensions didn’t actually display all relevant warnings. But that’s okay! Despite my curmudgeonly complaining, this was all fairly enjoyable. :)
Please ping me if I’m missing another root issue, or if you know of a quick easy fix for the whole gzip thing! This link probably works the best: http://khanacademy.org/jobs
:: edit :: The fellows at MathJax are super nice and responsive, and the main point described in this blog post is now irrelevant! Yay!