INSIDIOUS FILES
2023-03-19
The original version of this site was built with Bootstrap and jQuery. I used less than 1% of these two libraries' features, yet they added many kilobytes to my site's overall file size. The new redesign (a black and grey, lowercase only site which you will be seeing now if I haven't redesigned the site again) is way smaller and more energy efficient.
Having efficiency as my goal forced me to carefully consider what I would include in my site: huge Javascript frameworks like React and Vue were an absolute no, (even the previous site agreed on that) and Javascript or CSS libraries like Bootstrap and jQuery were off the table. I ended up excluding Javascript altogether in the main site. (there is still a small amount of Javascript on other areas of the site, like the lexicon page for Afaarmiša.)
I also try to compress my images and music as much as possible. I considered not having images at all, but I thought that would make the site too boring. Also, you can't have a photography page without images, and I'm quite happy with how quickly the photo albums load. With the music, I ended up sticking to the Ogg format, which I found had the smallest filesize out of itself, MP3, and WAV.
Recently, I added a favicon to my site. (That little icon next to the title of a browser tab) I like it; it makes the website look a little bit more put-together. However, Firefox's network tool showed me that my favicon was adding a whopping 100kb to every page!
How could this have happened? Well, in my unending buffoonery, I assumed that a favicon had to be in ICO format. In reality, a favicon can indeed be an ICO, but also a GIF or a PNG, both of which are significantly smaller than an ICO.
So i switched the ICO out for a PNG, and the home page returned to its regular 3 and a bit kilobyte size again.
Well, that would be true if Firefox didn't also say that the 333 byte SVG file at the bottom of my sidebar was actually over 40kb. Not sure why that happens, but for now im writing it off as a false alarm.
Moral of the story is: file formats matter, and always use compression.