Website Optimization Measures, Part XVIII
Published on March 6, 2023 (↻ August 23, 2023), filed under Development (RSS feed for all categories).
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:
-
Adding
role
s. 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 arole
,search
. As meiert.com’s foundation is from 2005 and as I iterate, I added a few more roles (main
,complementary
, andcontentinfo
), 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.) -
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.) -
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 🤷‍♂️] -
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.
-
Upgrading Eleventy. Of course (not doing so would mean not to maintain). eleventy-upgrade-help was useful.
-
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.
-
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.
-
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!
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: HTML Concepts: Customized Built-In Elements
- Previous: Conformance and Accessibility
- More under Development
- More from 2023
- Most popular posts
Looking for a way to comment? Comments have been disabled, unfortunately.
Get a good look at web development? Try WebGlossary.info—and The Web Development Glossary 3K. With explanations and definitions for thousands of terms of web development, web design, and related fields, building on Wikipedia as well as MDN Web Docs. Available at Apple Books, Kobo, Google Play Books, and Leanpub.