# MathJax feature requires external JavaScript for SE’s editor/preview

After MathJax got enabled,

• the editor buttons (for "Strong", "Emphasis" etc.) are hidden and
• the preview function does not work anymore

… when JavaScript from http://cdn.mathjax.org/ is blocked (or can’t load etc.).

(This seems to be the case for Mathematics SE, too.)

Is this intended/necessary? Do we really want to rely on external JS for core SE functionalities like the editor and the preview? I’d expect that blocked JS from cdn.mathjax.org would only affect the MathJax feature.

• Out of curiosity… who is blocking cdn.mathjax.org? – 200_success Apr 19 '14 at 10:42

We rely on external scripts for everything. Seriously - if you block all 3rd-party scripts, just about every page on the site will error out and you'll be stuck using the script-free fallbacks, at least where they exist.

I'm not gonna judge you if you want to block 3rd-party scripts. That's a personal decision, and if you're satisfied you have good reason to do so then go for it. But things will break. They'll break without warning, and it'll be your job to fix them or live with the breakage.

Hosting everything ourselves would force many people to load and cache common scripts unnecessarily, slowing down their page load times for the benefit of a handful of people who want to lock their browsers down. Nevermind that we use our own CDN on a separate domain for hosting most of this stuff (again, to speed it up), so a strict implementation of a 3rd-party script block would still break everything even if we did host them.

If you're looking for lists of things to whitelist, you can find a few here: Can we have a list of all the Stack Exchange domains somewhere, for firewall purposes?

• My issue is not that SE uses external scripts, but that blocking a script for displaying mathematical notation disables not only that feature, but also core SE functionality (that still works on all SE sites that don’t use MathJax). That’s why I ask "Is this intended/necessary?" -- I really don’t know this (as I don’t speak JS), but I assume that MathJax could be implemented in a graceful degradation way. – unor Apr 19 '14 at 16:30
• @unor If you block external scripts, you don't get Javascript from cdn.sstatic.net and it blocks a lot of core functionality. Treat cdn.mathjax.org as as important for SE as cdn.sstatic.net. – Gilles Apr 19 '14 at 19:23