Earth Notes: On Website Technicals (2020-03)Updated 2022-05-02 16:59 GMT.
By Damon Hart-Davis.
2020-03-31: Even Lazier
I'm still expecting that Firefox 75 mainline will emerge in about a week, with its strong
loading=lazy in place. (FF75 basically starts loading a lazy image only when just in the viewport.) That may cover ~7% of browsers; Edge may be just ahead of Firefox in usage, and be built on Chromium, but I don't think that lazy loading is on by default.
To this end I've tuned a few more things to take more advantage of laziness, eg non-lazily loading at most three desktop body images (was four), and only allowing preload of the first audio or video if both are on a page.
I've also started emitting information to allow computation of the entire (passive, ie no user action) page weight, assuming no lazy loading. I then expect to use that to provide warnings for over-heavy pages.
2020-03-18: Coronavirus Stuff
I put myself in 'self-isolation' at home hast week because I was feeling grotty. The rest of my family were dragged into 'lockdown' with me on Monday as the rules changed for sharing a house with someone possibly infected, ie me. The kids were looking forward to getting back to school on Friday, which they will, but then all schools in England are basically shutting on Friday afternoon.
(I'm still hoping to get out of the house for a walk for the first time in well over a week on Friday too.)
Happily, Radbot progress can continue with everyone working from home, though the face-to-face stuff is good and I'll be pleased when we can resume it. (There are only a few things that we need to do other than at home.)
So I may get more time to work on this site!
2020-03-14: Turning Down Ads Again
Ads still comprise a huge chunk of the weight of each page on which they are shown, indeed often the vast majority of it. So I've turned them down another notch on desktop pages, reducing the maximum shown on any one page in general, and limiting that still further (nominally to one) for all but the most popular pages.
The aim is to continue to earn some revenue, but with classier ads and less average burden on visitors.
2020-03-11: Aggressive Lazy Coming Down The Pipe
I have just tried the current Firefox Beta (75.0b2) and it is clearly responding to
loading=lazy. Firefox is much more aggressively lazy, and therefore likely more bandwidth efficient, than Chrome. Firefox 75 beta is apparently not loading lazy images until they just enter the viewport (vs thousands of pixels below it à la Chrome 80). That seems acceptable, though appears to create some jank of its own.
2020-03-08: Performance Micro-optimisations
I've made a couple of very small optimisations which will likely only affect a few edge cases, especially on slower/mobile browsers, but at least shouldn't make anything worse!
First, I've put the
src attribute last in the
img tag so that all the other attributes, especially
decoding, are available early for when the image data is inlined and thus the
src text value is large (many hundreds of bytes). My intention is to slightly improve processing and rendering of such inlined images, and any other images with a tag that crosses a packet/IO boundary.
Second, I tweaked the trailing Share42 social media buttons script at the very end of the body. It was marked
async, and is now
defer in the hope of allowing the DOM to be interactive (etc) a tiny bit sooner. Note: this does seem to push DOM Content Loaded back from lining up with
until the JS is loaded.
I'll see if anything complains, such as MachMetrics.
I'm not expecting miracles from either change!