Website Optimization Measures, Part XXV

Published on August 21, 2024, filed under and (RSS feed for allĀ categories).

For those of you who know this series, hi!ā€”for those of you who donā€™t, this is a series where I share improvements and lessons from the work on my personal projects, so that you can cherry-pick what you think could benefit yours (or laugh about the things I do).

  1. Test-driving the Clear-Site-Data header. Learning about it in Harry Robertsā€™ How to Clear Cache and Cookies on a Customerā€™s Device (when adding the article to Frontend Dogma), I added the following line to my server configurations (commented, and awaiting further testing):

    # Header always set Clear-Site-Data: "*"
  2. Switching to New York Times capitalization. I had been using title case for many years, until I ā€œofficiallyā€ adopted the New York Times style, reviewing their style guide and refactoring headings. I shared details and conventions after I had finished the switch.

  3. Axing alternative social graphics. On this site, meiert.com, I had for some time used an alternative image (sometimes several) for everything but the two homepages. What can I sayā€”it was like I woke one up one morning and didnā€™t like that alternative anymore. So I went back to using just one graphic, the same, for all pages. (Iā€™m sure Iā€™ll make other adjustments in the future.)

    A screenshot of one of my Mastodon posts, containing a meiert.com link preview.

    Figure: The now deprecated alternative in action.

  4. Starting to use fetchpriority=high. Its time felt ripe, and so Iā€™ve added and am currently testing fetchpriority in some of my projects.

  5. Starting to use axis shorthands. In my post on CSS in 2024, I rehashed my take on logical properties. Butā€”thereā€™s a scenario where Iā€™ve found them useful in mono-directional projects, and thatā€™s for axis-related shorthands like margin-inline, margin-block, &c. Iā€™ve been reviewing and updating my projects to make more use of these, and with that, condense and save code.

  6. Testing Cloudflare. Iā€™ve been putting Cloudflare in front of two domains, and am currently deciding how to interpret the results and what to do next. Focusing largely on Speed Index on five continents, in one case, Cloudflare led to a faster average 5 times, and a slower one 4 times; in the other case, Cloudflare led to consistent improvements. The improvements were up to 100 ms and 10%. Apart from not liking (and trying to understand) the mixed results for that one domain, Iā€™m now weighing whether the 10% saving is worth the (small) hoops to jump through, and the dependency that would be continued Cloudflare use (who then also provide no support on their free plan).

  7. Removing minimum-scale=1 from project viewport metadata. I donā€™t believe it hurt, but it didnā€™t seem necessary anymore, eitherā€”the minimum-scale=1 part in the <meta name=viewport content="initial-scale=1,minimum-scale=1,width=device-width"> directives Iā€™ve been using forā€¦ more than a decade. (What does it do? I refer to MDN!)

  8. Checking on obsolete HTML elements and attributes. I built ObsoHTML, and of course ran it over my own code base, too. Did I find obsolete HTML code? Yes. Fortunately, not in my own repositories, or where I wouldnā€™t expect it!

  9. Optimizing calls to action. Boy, am I not a marketer! šŸ˜…ā€”but I do write and sell books. On book pages (take the latest on HTML optimization), I feature a call-to-action button. ā€œBuy now,ā€ or something like that. It allows to go to one of the usually several book sellers where the respective book is available. Butā€”the choice may not be so clear, and interested readers may not want to purchase exactly at the site I recommend. A quick improvement? Include a link to ā€œother options,ā€ to make it clear if these exist.

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 support my work by buying one of my books (theyā€™re affordable, and many receive updates).Ā 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 somewhat 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 meiert.com I share some of my views andĀ experiences.

If youā€™d like to do me a favor, interpret charitably (I speak three languages, and they do collide), yet be critical and give feedback, so that I can make improvements. ThankĀ you!