Ah, with lazy loading, browsers only start loading images when the load event occurs. And that takes time. Hm. Not a fan, I might revert this. 🤔
Timeline
Recent posts from feeds followed by sorenpeter@darch.dk
@movq Oooph! Web development is tidious.
I also include width and height from now on in my galleries.
@lyse I noticed that loading="lazy" might not be so great after all.
This is without lazy loading:
https://movq.de/v/1ea351add4/s.png
The total page load time is around 400-500 ms. Okay.
Now this is with lazy loading:
https://movq.de/v/9708e1afff/s.png
It finished much quicker, after about 250 ms. Sounds good.
But notice this gap right here?
https://movq.de/v/96645a7a75/s.png
This wasn’t there before. With lazy loading, it now takes something like 80-100 ms until the browser even starts loading images. This is Chromium, but Firefox shows a similar gap.
The net result is that there is a very noticeable delay/flicker when you open a page, because it takes so long until the images have loaded. Yes, the layout doesn’t shift around, but that has nothing to do with lazy loading.
How odd. 🤔
@movq I see. I just use CDATA (and still have the XHTML trailing slash for <img … />). But of course, it also has its drawbacks: https://waspdev.com/articles/2026-05-11/avoid-using-cdata-in-rss I might just move away from it.
Everything is a web service these days. :-/
Interesting, HTTPS is almost twice as slow as plain HTTP on my server (~72 ms vs. ~135 ms):
$ hyperfine -r 50 "curl -so /dev/null 'http://movq.de/blog/postings/2024-05-23/0/t/word11a.jpg.jpg'"
Benchmark 1: curl -so /dev/null 'http://movq.de/blog/postings/2024-05-23/0/t/word11a.jpg.jpg'
Time (mean ± σ): 72.7 ms ± 17.2 ms [User: 6.2 ms, System: 4.8 ms]
Range (min … max): 49.5 ms … 99.7 ms 50 runs
$ hyperfine -r 50 "curl -so /dev/null 'https://movq.de/blog/postings/2024-05-23/0/t/word11a.jpg.jpg'"
Benchmark 1: curl -so /dev/null 'https://movq.de/blog/postings/2024-05-23/0/t/word11a.jpg.jpg'
Time (mean ± σ): 135.5 ms ± 28.9 ms [User: 17.8 ms, System: 5.6 ms]
Range (min … max): 93.2 ms … 198.5 ms 50 runs @lyse Oh my god, there’s nothing that CSS can’t do, eh? 😳 Crazy stuff.
Okay, I’m using the “official” validator now:
https://github.com/w3c/feedvalidator
That repo is supposed to be a website/webservice, though. The feedvalidator directory contains the actual validator. I’m using this wrapper on top: https://movq.de/v/94b5b8978c/
@lyse Putting HTML into the feed. It should be XHTML. 🤪 (I used <img ...> instead of <img .../>.)
@lyse Nice! (But if you ask me, a day without sun would a welcome change. 🤣)
søren peter mørch