Website Optimization Measures, Part XVII
Published on December 15, 2022 (↻ October 21, 2024), filed under Development and Everything Else (RSS feed for all categories).
It seems that in the past months, I’ve spent my infinite free time on many improvements to my projects. If you’re new to this series on my website, this is where I share such improvements. Short and sweet.
-
Consolidating encoding declarations. I had a block of directives in several .htaccess files, like
AddCharset utf-8 .css AddCharset utf-8 .js AddCharset utf-8 .txt AddCharset utf-8 .xml
Late (as per a now corrected 2008 post) did I learn that this can be simplified:
AddCharset utf-8 .css .js .txt .xml
-
Reviewing and simplifying conditionals. Like everyone, I’m customizing my sites based on certain conditions. In some old cases, however, I checked on those conditions in manners that are too complicated. For example, determining if an article had been translated by, say, checking on a Boolean
l10n
, then inserting a link with itsl10n-url
. That can, of course, be simplified—check onl10n-url
alone. I cleaned up verbose “logic” like this. -
Listening more to what Ahrefs says (no advertising). I’ve been using Ahrefs for a few years, not only to inform my yearly check on the conformance of the most popular websites (2021, 2022)—but to monitor all my sites on SEO issues. For the longest time I paid only cursory attention to the Ahrefs health status for my domains, until I found that it was smart to keep an eye on that. And I’ve fixed the issues Ahrefs pointed for a few months now—from broken links to “non-canonical” pages in sitemaps—, and it led to: optimization of the respective sites.
-
Repairing
ErrorDocument
error page encodings. For some of my domains, like mirrors.meiert.org, I don’t set up dedicated error pages, but use Apache’sErrorDocument
directive to generate minimal (valid) HTML. However, for “some reason” there had always been inexplicable encoding problems—until I decided to investigate. That investigation brought up an apparently “not very well covered” issue in Apache, which is leading to errors such as this ISO/IEC 8859-1 encoding one.The solution? Suppress that behavior—and set the correct encoding through a
meta
element:SetEnvIf Host ^ suppress-error-charset ErrorDocument 401 '<!DOCTYPE html><title>Error</title><link rel=stylesheet href=https://d3rdtowr0c5lpf.cloudfront.net/setup/auxiliary.min.css><meta charset=utf-8><meta name=viewport content="initial-scale=1,minimum-scale=1,width=device-width"><p>Unauthorized.<p><a href=https://meiert.com/en/>🅜</a>' …
-
Adding Mastodon and toot links. At the end of October, I set camp on Mastodon; at the beginning of November, I had enough of Twitter. I deleted my Twitter ad campaigns, put all Twitter accounts on auto-pilot, and worked on understanding and integrating with Mastodon. Naturally, this led to adding links to Mastodon, as well as links to toot entries, and not only to tweet them. (On this note, why not follow me and Frontend Dogma on Mastodon?)
-
Making Mastodon a first-class citizen (and demoting Twitter). At the beginning of December, then—given that Mr. Musk proved eager to destroy company and network—, I ignited another stage in a makeshift operation to move away from Twitter, meaning that I put Mastodon first, and Twitter somewhere else. I was grossed out at this stage, nearly appalled by the thought that I was pointing to, let alone using Twitter. (This did feel a bit irrational, too, but I’ve had no interest in questioning moving away from the birdsite.) I’m not sure what stage this was exactly, and how many more have followed or will follow.
Spoiler: UITest.com is the only active site still prominently pointing to Twitter, but it’s also in the process of being merged with Frontend Dogma. Inactive projects, like Haiku Haiku Love or HH Kaffee, I will probably leave as is.
-
Moving away from—Bitbucket. This came out of nowhere, even for myself. I’ve been using Bitbucket for more than 10 years, and it has been great!—but at some point I felt this impulse to consolidate on GitHub, and to also revisit my project structure, moving away from the monorepo I had worked with on Bitbucket. The move was done fairly swiftly, and worked without any issues. I cannot say much more about this activity, other than “thank you,” to Atlassian.
-
Cleaning up Eleventy configs. Sure, though what did I do exactly? 🤔 It was a number of things, and different things across projects, but HH Kaffee’s .eleventy.js is the only file (and history) that I can point to. Next time, I’ll try to break this into specific improvements, as all the measures shared in this post series should still be somewhat actionable.
This is a part of an open article series. Check out some of the other posts!
About Me
I’m Jens (long: Jens Oliver Meiert), and I’m a frontend engineering leader and tech author/publisher. I’ve worked as a technical lead for companies like Google and as an engineering manager for companies like Miro, I’m a contributor to several web standards, and I write and review books for O’Reilly and Frontend Dogma.
I love trying things, not only in web development (and engineering management), but also in other areas like philosophy. Here on meiert.com I share some of my experiences and views. (Please be critical, interpret charitably, and give feedback.)
Read More
Maybe of interest to you, too:
- Next: A Brief History of UITest.com
- Previous: The Reverse A-Hole Rule of Social Media
- More under Development or Everything Else
- More from 2022
- Most popular posts
Looking for a way to comment? Comments have been disabled, unfortunately.
Is it possible to find fault with everything? Try The Problems With All the Good Things (2023). In a little philosophical experiment, I’m making use of AI to look into this question—and what it means. Available at Amazon, Apple Books, Kobo, Google Play Books, and Leanpub.