menga

dealing with old code when you've been blogging for years

I just finished cleaning up an ungodly amount of content. I'm not talking about removing swear words or anything like that. I mean fixing things that come with the territory of authoring a site for over two decades.

For example, YouTube video embeds. Not only has the embed code itself that YouTube provided changed many times, but a ton of videos are no longer viewable. Videos get deleted, videos are sometimes set to private, YouTube accounts get deleted, YouTube users sometimes get banned for whatever reason. Any of those things can happen to any YouTube video.

If you have a site chock full of content, such as mine, and a ton of your posts have videos that used to work but now don't, that's a problem.

For a long while now, I knew at some point that I'd have to go through my posts here and fix the broken stuff. And not just for YouTube videos that didn't work anymore. There was a whole laundry list that needed to be done.

I think I finally fixed everything. Probably. The big stuff is out of the way, at least.

Before getting into some of the fixes I did, it doesn't surprise me at all that bigger sites like AOL, MSN, Yahoo and the like have ridiculous amounts of dead links. If for example I pull up an archive of Yahoo's home page from 2010:

yahoo 2010

...none of those article links work. It's not happening. Sure, if I go back to, say, 2019, those still work. But the further back you go, the more dead links you find.

Some of the fixes I did:

Switch to AVIF

AVIF is a modern image format. By switching to this, I was able to dump all the chunky JPG, GIF and PNG images. AVIF is much smaller, supports animations, supports transparency and works in all modern major browsers.

To put this in perspective, a "little" animated GIF at 300K is about 65K as an AVIF, and looks better.

Removal of a ton of YouTube embeds

When I combed through my old posts, I found more than a few videos I linked from others that were gone, so those were removed. I even removed some of my own videos. That doesn't mean I deleted my videos, but rather just took out the embed code from here. Sometimes I would just chuck in one of my videos here to a post thinking it would make it better, but not really. All it did was just make that post take longer to load.

I think it's also true that generally speaking, if someone wants to specifically watch video, they will go to YouTube to do it instead of viewing video on a web site. Am I wrong here?

Removal of junk JavaScript

This is best explained by example. What I'm about to describe is a very old school thing, but my site has been around long enough to where I had a few of these.

Way back in the day, some sites had little personality tests. You'd take the test and it would report back something like, "You are 30% inquisitive, 40% brave, 10% dangerous, 20% reserved" or something to that effect. After you got your test result in the browser, the site would offer browser code you could use to host it elsewhere. If you had an AOL Hometown page, Geocities page (remember those?) or your own web site, you could take the code and use it.

The code you would get was a glut of poorly written JavaScript that only somewhat worked with most browsers at the time, an absolutely won't work with any modern browser now.

Modern browsers are resilient enough to chuck out bad code and still render the web page as best it can, but even so, I cleaned up that mess anywhere I found it.

Fixing watch and guitar links

This is one where I think I got all of them, but there are probably a few stragglers.

An example of this is the Casio W59. When I wrote about that in 2018 with the post Casio W59 is better than Casio F-91W, widely available, no problem. Not anymore, so I had to fix the links for that one.

Another is the Gibson Firebird Zero guitar that I wrote about in 2016 with the post Guitar of the week #79 - Gibson Firebird Zero. Again, widely available at the time I wrote that, but the links I had to it went toes up, so that was fixed.

Fixing internal links

This means linking to another post from within a post just like I did above. The URL structure of this site changed a few times over the years, but I think I found everything that needed to be re-linked properly.

An archive page that actually works like it's supposed to

My archives page, said honestly, sucked. Pagination issues and whatnot. That's finally been fixed. It's all separated by month, and on click of any month/year, all of the posts for that frame of time are shown with no problems.

~ ~ ~

There was more I did, but it mostly centers around programming, which I'm certain you don't want to read about.

Why did I do all this?

I've been on older forums and other older web sites where I encounter broken stuff. Videos that don't work, images that won't load, bad JavaScript, links that go nowhere, whatever. Every time I encounter this, it irks me, and I didn't want my site like that.

It was a personal project of mine to fix the broken crap here, so I did it. It took weeks if not over a month just plugging away until I finally finished it all.

There should (operative word there) be no more instances of busted videos, busted links or any of that other crap here now.

Like this? 🎁 Nice people tip!

Published 2025 Sep 14