upvote
Both.

Runtime can certainly be optimized, but the app can also virtualize or force unloading if it needs to.

reply
It's a difficult question because there are so many factors in dom/css that change the answer to 'is there a chance that the image should be rendered the next frame?' that it becomes really hard to implement a strategy for what content to offload to disk and when

If the runtime fails to load the offloaded data back in time there will be visible rendering artifacts so you really have to make sure your strategy is robust

reply
If the static page is badly written and does not instruct the browser to use lazy loading (using the loading="lazy" attribute on the img tag) and the browser loads them all at the same time, is that a problem with the page or the browser?
reply
The whole ecosystem.

Lazy loading for images was only introduced around 2019, not every website out there will have been updated since (and retroactively become “badly written”).

It is also not on by default, because the platform itself is too conservative and the implementation doesn’t allow zero breakage changes of defaults like that.

The tooling culture around HTML also isn’t such that you’d be prevented from deploying a site if you can use it but don’t, at least you’re not railroaded towards that.

Lazy should have been the implicit default and we should have gotten loading=“eager” instead. Same with having sane calendar controls, dropdown and collapsible controls, video controls so good we wouldn’t need vendor equivalents, light boxes for images and so on.

reply