3 ms·
Great post, although I'm a little meh on lazy-loading images. I like when the whole page is finished loading the moment I think it's finished loading. But more
by rdiddly 7y ago
Great post, although I'm a little meh on lazy-loading images. I like when the whole page is finished loading the moment I think it's finished loading. But more to the point, lazy-loading can be a crutch just like AMP is, for solving problems that shouldn't exist, such as: your page is big & bloated. If you keep it small, there's no need for lazy-loading. But you have to limit the number of images, and optimize the ones that are there. And probably only one video per page. Horrors! Obviously none of this works when the page is effectively infinite in size - such as when you're trying to give the user the addictive excitement of scrolling through a continuous, visually-rich "feed".
- account42 7y agoYeah, please don't add lazy loading. - It breaks viewing the site with javascript disabled. - It prevents viewing the site offline (e.g. on an airplane) without first scrolling through the whole content while online. - Unless implemented perfectly it adds delays before content you have scrolled to becomes visible. Deciding when to load stuff should be the browser's job. Don't reimplement the browser in javascript.
- EamonnMR 7y agoI'd love to see a lazy loading idiom implemented in pure HTML. But I'm not holding my breath.
- squiggleblaz 7y agoWhat's wrong with <img src="image.png">? Maybe some kind of semantic purpose <img src="image.png" purpose="decoration"> vs <img src="image.png" purpose="graphical-content"> but you can imagine every website owner will think that their logo is graphical content and respectful UA authors will need to disregard the semantic attributes and try to guess based on the presence or absence of some kind of caption, for instance. UAs could easily lazy load by default on metred connections.
- EamonnMR 7y agoThe page layout changes after the image loads, which is annoying as a user. Probably because users have been trained to hate page layout changes that happen a few seconds late because of that dark pattern where you change the page right as the user is about to click to change the thing they click on. How they achieve this on mobile is anyone's guess.
- squiggleblaz 7y ago> - It prevents viewing the site offline (e.g. on an airplane) without first scrolling through the whole content while online. I'm genuinely surprised by how many apparently considerate websites like Wikipedia seem to completely ignore this consideration. I often don't have a working internet connection. Why shouldn't I be able to read the article I already loaded when on wifi? Why should I pay for mobile data when I tried to load a page on wifi? Meaningful, content images should be loaded on a phone when using a non-metred connection promptly so that a user need not waste their metred connection just because they want to read an article on a bus - or a subway. Breaking the website for the five geeks who disable javascript isn't really a valid consideration, in my view, despite the fact that I ran with disabled javascript for a long time. But your final paragraph is very much true. Mobile UA authors should consider enabling lazy loading on metred connections and disabling it on non-metred connections by default. Long term users of web browsers can probably remember in the days of 14.4k browsers, many people used the setting to disable loading images by default. A modern version of that setting should be restored.