..

Four, Oh, Four...

I did it.

I finally broke down and added the tiniest bit of JavaScript to my site. I know, I'm awful, but hear me out.

I've been thinking about retro computing a lot again, especially as it pertains to The Internet (capital "T," capital "I," baby), and I've been wanting to add a little more personality (and maybe an easter egg or two) to things.

One thing that I haven't yet set up for myself is a kickass 404 pageā€”or... you know... a 404 page at all. I think I designed a simple one a million moons ago, but I never actually configured my web server to serve it up.

But I'm nothing if not an expert procrastinator, so I finally jumped into my Caddyfile, pointed all its 404 responses to my 404 page, and... was supremely disappointed.

The page I had was boring.

So I dug into the depths of my brainpan and remembered an old glitch effect I used half-a-dozen years ago that felt right at home with my preferred aesthetic. Unfortunately, this meant importing one small JavaScript file and adding a single line of code to activate it.

But, in the interest of keeping things tidy, it's only loaded on my error page (alongside a fun deconstruction of a rotary phone, courtesy of our friends at OpenAI), and is all sorts of fun to look at.

If you're interested, feel free to head directly to /404.html, or just mash your keyboard a bit to get to an actual 404 error on the flower.codes domain.

Oh, and in case you were wondering how old browsers deal with this? The answer is twofold: not well, and it doesn't really matter.

While the actual 404.html page can be loaded in older browsers, most of them ignore the <script> tags (except for our friend Internet Explorer, which fails hard, but I fixed that with conditional comments), but more importantly, nearly every historical browser shows their own error page when a 404 response is encountered; so investing any real effort into backwards compatibility is a moot point.

--

If you like this post or one of my projects, you can buy me a coffee, or send me a note. I'd love to hear from you!

--

This is post 022 of #100DaysToOffload