Suggest <script async> everywhere
pkra opened this issue · 2 comments
pkra commented
HTML5 async attribute is probably the right recommendation to make in the docs (and on mathjax.org). Non-HTML5 browser apparently ignore it so there's no risk.
Not a huge save but still worth it.
References.
- http://css-tricks.com/async-attribute-scripts-bottom/ (and the links at the top of that post)
- on blocking scripts vs inline scripts vs the new async attribute. https://www.igvita.com/2014/05/20/script-injected-async-scripts-considered-harmful/
pkra commented
To clarify, with async we can more easily keep our suggestion to keep MathJax.js in the head (instead of "manual" script injection as some places suggest or instead of pushing it to the bottom of the page as "normal" JS code "should").
Here's another interesting thing http://www.html5rocks.com/en/tutorials/speed/script-loading/
pkra commented
To summarize something like <script async defer src="//cdn.mathjax.org/[...]"></script>