Yes, yes, it's horrible. I am actually going to have JavaScript on my website now.
One of the appeals of my website, and the way I designed it, was for it to be usable in a terminal or a very old computer/web browser. As such, I don't want to completely infect the site with JavaScript everywhere. I was recluctant even to use CSS, to give you a picture of how much I wanted this to just be pure HTML. But, I've reached the point where I feel a small amount of js is necessary, so I will be including some scripts on some pages (two .js
files from two separate CDNs).
The only purpose at this point is going to be for me to type LaTeX-style equations in the browser using MathJax, as I am a mathematician after all. There are many times when I wished that I could write about math effectively on this site, and being unable to do so felt restrictive. I could theoretically compile all of my math writing into .pdfs
(which I already do anyways for the more serious stuff), but I felt better about being able to be free-flow with math equations when the feeling strikes.
The CDNs used are polyfill.io
, which is for supporting newer features in older browsers (I felt this was necessary if I was going to have JavaScript), and MathJax from cdn.jsdelivr.net
, which actually handles the equations. These will only be pulled in on pages which actually need them. Ideally, I want to move at least MathJax to a local installation on my server to minimize CDN connections, but I don't know if I have the technical skill to set up polyfill alone, as they do not seem to have documentation for it that I could find.
Now, for some extra justification of this method of showing equations for older machines or terminal browsers, it seems that when I view a test page I have with lynx
, it's just displaying the equations as their LaTeX code. I find this totally acceptable, personally, as people who are in a math-heavy field will be able to understand the code (for example, I can read LaTeX equations fluently at this point); though I understand that some people will not be able to do that, especially depending on the level of mathematics I'm discussing and the audience that I'm targetting. I'm hoping that the intersection of people who are trying to use my site to learn mathematics, who don't understand LaTeX equations, and who are using a pre-IE8 web browser is quite small. If you fall in this intersection, email me and tell me what the site looks like for you (because I have no way of testing this myself; my ThinkPads, while old, use modern browsers) and I can work on making it better, or consider alternatives.
So I haven't actually done much with the site since I wrote this, since I've been working on school for the past few months. I realized today that using polyfill is probably pointless, as my website uses HTTPS and thus may not even be accessible to those using non-encrypted (or TLS-encrypted) HTTP connections. Thus, I think just using MathJax, which is absolutely necessary for the math, is the pathway forward.
September 29, 2023. Update May 29, 2024.