Website Optimization Measures, Part XVIII

Post from March 6, 2023, filed under (feed).

If this was golf, we would be playing the finishing hole. But this series of things I do and improve on my websites, of refactoring and optimization ideas, is open-ended:

  1. Adding roles. I’m an HTML minimalist, and I love the first rule of ARIA. But for some reason I found that meiert.com’s site search could use a role, search. As meiert.com’s foundation is from 2005 and as I iterate, I added a few more roles (main, complementary, and contentinfo), kind of as a transitional update before I get to make the switch to a new template and system. (Both is in place, but, the cost of problem isn’t high, meaning that it’s not a high priority and progress is slow.)

  2. Removing superfluous “mod_rewrite.c” checks, and reordering ™RewriteRule” flags: Many an Apache rewrite is being promoted and wrapped with a conditional, like

    <IfModule mod_rewrite.c>
      RewriteEngine On
      # Rewrite rules
    </IfModule>

    —and that makes sense, until you notice that it works on your servers, and until it dawns on you that the check may always succeed… and therefore not be needed.

    In addition, rewrite rules may contain flags, as in this case:

    RewriteRule ^ https://meiert.com%{REQUEST_URI} [R=301,L]

    I can’t help noticing this stuff, so I reviewed available flags, and, given that their order doesn’t matter, reordered them (can’t help this, either). For example, I always put L last. (I didn’t standardize and document an order. Yet.)

  3. Removing—and adding back <guid> elements to RSS feeds. (Yes. For real.) [And now, months later as I try to provide context and details, I notice I forgot about that all. But those <guid>s, yes, they’re still in the feeds đź¤·â€Ťâ™‚️]

  4. Giving all images a minimum width and height—and axing the plan right before implementation. Following good advice reiterated at this year’s GDE Summit (for CLS, “reserving not enough space is better than no space at all”), I planned to assign a defensive minimum width and height to my projects’ media contents—until I found the sizes to vary so much, that this made more theoretical sense than practical.

  5. Upgrading Eleventy. Of course (not doing so would mean not to maintain). eleventy-upgrade-help was useful.

  6. Refactoring soft block lists. I try hard not to block anyone or anything online. I’ve outlined some of the reasons in Reasons to Listen to Whom You Don’t Agree With. (Then, since switching to Mastodon, my part of the Web is largely constructive.) However, there are exceptions to this, and as these include members of our field, and as I cover the field extensively on Frontend Dogma, I had developed a “soft block” for social media attribution. That soft block started out as a light conditional to check on and not display the respective Twitter and Mastodon handles; and that’s what I refactored, to work with an array instead, and optimize the code further. I hate having this in place, I may be wrong, but I’m annoyed.

  7. Reviewing and opening up site licenses. Although usually generous with licenses (and pricing), for many years I had put meiert.com under a relatively strict license not permitting derivative work. I took feedback from a few readers to review, and, where applicable, put meiert.com under CC BY–SA 4.0.

  8. Updating compression settings. I’m working with two hosting providers, both shared. (ALL-INKL.COM and DreamHost, and I’m actually quite happy with them.) Shared hosting comes with a ton of server defaults. For literally 20 years, both ALL-INKL.COM and DreamHost have only offered Gzip compression.

    Now, I didn’t check whether there had turned up a chance to manually activate the respective modules—but ALL-INKL.COM had silently switched to Brotli, which is more effective. And that, to conclude the story and this post and that idea to allow you to check for similar things on your end, too, was something I tested on all my domains, reconfigured, where I could use it (meaning for it to span more file/MIME types), to therefore optimize the respective sites.

This is a part of an open article series. Check out some of the other posts!

Toot or tweet about this?

About Me

Jens Oliver Meiert, on September 30, 2021.

I’m Jens, and I’m an engineering lead and author. I’ve worked as a technical lead for Google, I’m close to W3C and WHATWG, and I write and review books for O’Reilly. I love trying things, sometimes including philosophy, art, and adventure. Here on meiert.com I share some of my views and experiences.

If you have a question or suggestion about what I write, please leave a comment (if available) or a message. Thank you!