Website Optimization Measures, Part XVIII
Published on MarĀ 6, 2023 (updated AugĀ 23, 2023), filed under development, optimization (feed). (Share this on Mastodon orĀ Bluesky?)
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 optimization posts!
About Me
Iām Jens (long: Jens Oliver Meiert), and Iām a web developer, manager, and author. Iāve been working as a technical lead and engineering manager for companies youāve never heard of and companies you use every day, Iām an occasional contributor to web standards (like HTML, CSS, WCAG), 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. (I value you being critical, interpreting charitably, and giving feedback.)