Website Optimization Measures, Part XVII

Published on December 15, 2022 (↻ May 18, 2024), filed under and (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.

  1. 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
  2. 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 its l10n-url. That can, of course, be simplified—check on l10n-url alone. I cleaned up verbose “logic” like this.

  3. 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.

  4. Repairing ErrorDocument error page encodings. For some of my domains, like, I don’t set up dedicated error pages, but use Apache’s ErrorDocument 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-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­­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=­en/>đź…ś</a>'
  5. 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?)

  6. 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: 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.

  7. 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.

  8. 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 its 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!

Was this useful or interesting? Share (toot) this post, or maybe treat me to a coffee. Thanks!

About Me

Jens Oliver Meiert, on September 30, 2021.

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 close to W3C and WHATWG, 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 I share some of my views and experiences.

If you want to do me a favor, interpret charitably (I speak three languages, and they can collide), yet be critical and give feedback for me to learn and improve. Thank you!