9 ms·
I think I kind of hate lazy loading
- ttfkam 3y agoIt's curious that some folks hate the side effects of insufficient infrastructure while missing that the lack of modern infrastructure is the root problem. It is entirely possible to get a cell signal on a train, even in tunnels. We as a society just choose not to build out the necessary infrastructure.
- gonzo41 3y agoEurope has the benefit of having had a lot of roads created by the Romans. Infrastructure takes time.
- dylan604 3y agoBut it burns in a day?
- NotYourLawyer 3y agoAdding physical networking infrastructure to all the trains and everything else is a much bigger job than adding a setting to a browser that lets the user opt out of lazy loading.
- mvdtnz 3y agoAs a software developer I have very little control over rail infrastructure. However I have almost total control over the HTML attributes I emit.
- dylan604 3y ago[flagged]
- ttfkam 3y agoAs a user, I have very little control over 99.999% of all sites' infrastructures. We were talking about lazy loading on a train. Most users have no control over the HTML attributes they receive. As software developers make up a vanishingly small amount of all users on trains, it seems prudent to highlight their collective experience, not the portion of a one-off that you can control as an individual contributor. I'm well aware that you or I as individuals have very little control over public transit infrastructure. It's a shame we cannot team up as a group to solve these issues rather than fixate on our experiences solely through a personal lens.
- vorpalhex 3y agoRight, because it's expensive and difficult and would make the train cost more. You could have truly wireless electricity power your phone and never have to recharge. You just need to invest in more infrastructure.
- ttfkam 3y ago> Right, because it's expensive and difficult and would make the train cost more. That you (and others) think network connectivity is anything higher than a rounding error in terms of rail infrastructure costs is likely part of the problem.
- tekla 3y agoIt is the web developers choice to decide whether or not to deal with bad/poor internet connections. Most do not. Lazy loading makes it impossible to do anything to manage a poor connection.
- tentacleuno 3y agoSeems hard not to these days, especially with service workers which can cache resources for offline use.
- syndicatedjelly 3y ago> Lazy loading makes it impossible to do anything to manage a poor connection. This was the exact problem lazy loading was supposed to solve
- hunter2_ 3y agoIf the problem was out-of-viewport images impeding the receipt of assets that do affect the viewport (CSS, fonts, etc.) then it would be good to postpone fetching those images just until everything else is received, rather than postponing until they're closer to the viewport.
- syndicatedjelly 3y agoFun fact, if you type your password, it will show up as ***
- plorkyeran 3y agoWhich is indeed why it's a terrible idea.
- ponderings 3y agoMakes me wonder what other great ideas we've implemented.
- vhcr 3y agoIn this case it's also the choice of the user, they could choose to ignore the lazy loading tags (I know OP mentions their browser doesn't supports it, but they could choose another browser)
- Vanit 3y agoAh, it's the users who are wrong! In all seriousness, as engineers we of course can't assume the happy path is common, and to ensure good UX more often than not we need to account for these cases.
- ttfkam 3y agoI'm not sure how you possibly got that reading from what I wrote. I'm am discussing a solution rather than a series of ephemeral and incomplete fixes. Not that developers can solve public transit issues but that society at large is the only one that can truly solve these issues. The users are not wrong in my assertion nor do I think disabling lazy loading is the solution. Disabling lazy loading is an ephemeral and incomplete fix that helps some scenarios while degrading the experience in other scenarios. The solution is improved infrastructure. I don't see why this position is controversial.
- spaceprison 3y agoSo: developers can't change the way society has chosen to prioritize infrastructure, Poor user experience is the result of this societal failure, thus there is nothing that can be done to improve user experience? It seems more likely that the expectation that users must have consistent connectivity to load (and keep loaded) the most fundamental aspects of a website (images and text) is a poor assumption and the hubris to leave this type of assumption unchecked the actual root problem.
- alpaca128 3y agoSoftware is easier to adapt than everything else and users don't care why your website doesn't work properly. Building a website with the assumption that the user will have a perfect internet connection is like writing an application without error handling. When something goes wrong you can't just blame reality for being imperfect.
- forgotmypw17 3y agoLazy loading breaks a lot of functionality. For example, I open a webpage and then go offline. Later, I scroll down, but the content is missing. Another time, I open a webpage and save it. But most of the content is not saved, because it has not been loaded. The network activity is actually higher for a page with lazy-loading elements. All-around, it does not make any sense to me, personally.
- hn_throwaway_99 3y agoBoth of these seem like uncommon edge cases. I can't remember the last time I actually "saved a webpage" - I think in my using the web for nearly the past 30 years that functionality hardly ever worked well in the first place. I do use print-to-PDF fairly often, but honestly don't know how lazy load works in that scenario. If you choose to print all pages and it doesn't include lazy loaded images, I'd just consider that a bug.
- forgotmypw17 3y agoFor you, they are uncommon edge cases. For me, they are everyday usage.
- yathaid 3y agoThe problems lazy loading solves is an everyday issue for me. So ... I guess the lack of user control here is the annoying part. Hopefully in the next round of standards updates this makes it in.
- hahn-kev 3y agoI mean it wouldn't be hard to run a simple user script to add or remove all lazy attributes, though this isn't a solution for everyone, but most people don't care either.
- rightbyte 3y agoGiven how much link rot there is I would have wanted all my non-porn non-bank website visits to be saved to some encrypted folder, in some way. Especially since Google got so bad you can't refind webpages you know exist.
- hn_throwaway_99 3y agoA weird complaint if you ask me. Browsers and developers should try to do their best with limited resources. So it most cases that means making predictions about user behavior. Sometimes that means preloading content (e.g. if you're on a landing page, preloading content from the next likely page will make the it feel much more performant) and sometimes lazy loading to not waste resources if a user isn't going to see content in the first place. But of course there will be "bad branch predictions" sometimes. I think "having a page load before I get into the tunnel but not scroll down enough to have content load before I lose Internet connection" certainly seems like a case that it's fair not to optimize for.
- WillPostForFood 3y agoInstead of all the complexity and code and branch predication, how about just send the page and the images? If lazy loading is super important, the browser can lazy load and render off screen. Don't make thousands of solutions for thousands of platforms on the server side.
- quickthrower2 3y agoI agree but changing the world to that would be quite a fuss. But if that was already where we are at it would be better. But the JS as an Operating System per site ship has sailed.
- hn_throwaway_99 3y agoI don't understand your comment at all. Before the loading attribute on img, developers did have lots of custom solutions for lazy loading. A major point of lazy loading is to save resources on the server that would be wasted when serving an image that is never seen.
- WillPostForFood 3y agoI like the loading attribute, but it hasn't been supported in Safari until very recently, so the solution has had to be a bespoke server + javascript solution to please Google. Still think a better solution is for the browser to optimize what is "below the fold" and make the decision based on user preference (I want to load the whole page). And most importantly, Google shouldn't weigh in on how to implement pages.
- xnx 3y agoI generally dislike lazy loading. My time is almost always worth more than data transfer costs, so I'd much rather load up a bunch of stuff I might not see so that in the office chance I fast scroll down the page I don't have to wait for anything.
- hunter2_ 3y agoYou're thinking of your own costs; the developer is more likely thinking of their own than yours.
- duxup 3y agoAs a web dev… I honestly have never thought of it that way in terms of cost. I would rather a user see the whole page, consume all the content, it’s not a big cost.
- lxgr 3y agoThen you’ve probably just not worked on pages of that scale so far. Some very large sites maintain alternate versions of images in chance the browser supports something more efficient than JPEG; that can save about 30% – at the expense of a lot of complexity and extra server side storage. Yet they still do it: It’s still worth it for them. But nothing beats not loading the image at all! As a web user, I personally also don’t particularly like it.
- deprecative 3y agoIf only we could progressively enhance a page rather than stunt them via lazy loading.
- Izkata 3y agoImage-wise, isn't GIF capable of that? I remember back in the dialup days some image type would be quickly visible but very pixelated, then slowly get more detail as more of the image downloaded.
- nicbou 3y agoI live in Germany and so do most of my users, so I take the spotty internet rather seriously. There are lots of holes in the coverage even in the capital. Then there is the underground. However loading the images early wastes bandwidth, and it hurts SEO. In my case the user can live without those images, so it's a sacrifice I'm willing to make. I hope that descriptive alt tags will help. On the other hand, the whole text is there from the start and every other way is wrong.
- WillPostForFood 3y agoit hurts SEO. In my case the user can live without those images, so it's a sacrifice I'm willing to make. This is one of the big problems with the modern web, It puts you in this doom loop: sacrifice the user to please Google to get users.
- donatj 3y agoI feel this. So much of what I do to appease Google Search Console ends up actually hurting the user experience. Blind ruled lacking of context.
- nicbou 3y agoI agree wholeheartedly, although for the most part the performance metrics match my needs as a user. In this case it means preserving bandwidth unless it's needed. I lazyload images for the same reason I serve 4 different image sizes.
- dgb23 3y agoThe performance metrics in pagespeed/lighthouse etc. are not really assessing performance directly. You can have a slow, bloated website but great metrics, because you’re doing the “right” things. However lazy loading images that are not on screen is generally a good thing. Images are typically the heaviest part of a website and loading them only when needed is good. The article in question acknowledges that, but is criticizing the implementation and failure mode.
- 3y ago
- brink 3y agoEh, mistakenly clicking an ad or irrelevant content when trying to click a link because the page loaded some async content at the last millisecond is far worse.
- WillPostForFood 3y agoIt is all bad because now all the images are async content too.
- mouse_ 3y agoThey do that on purpose.
- lancefisher 3y agoIt’s a data driven decision. They a/b tested and found users were more interested in clicking on ads when images were lazy loaded.
- viraptor 3y agoOr a more mundane reason: You need to add the dimensions to the image to reserve the page side and prevent skipping. That takes extra effort and is not something people think about. If there are any places that a/b tested changing layouts specifically, I expect it's extremely few. It's much easier to make the background a clickable ad area and some pages do that explicitly.
- kwhitefoot 3y agoWhy does anyone need to add the dimensions? Surely the build process can do this ahead of time or the server can do it on the fly. It only needs to be thought of once.
- viraptor 3y agoYou still need to either use a fully integrated dev/build system which allows it, or explicitly add the placeholders. The build process of course could add the actual numbers, but I don't think I've ever seen that happen outside of CMS content. (Specifically content, not even the theme / static stuff)
- highwind 3y agoThere used to be a time where you can load up a YouTube video on the site and go offline then watch the video. You can't do that any more, unless you actively find a way to download the said video.
- deadmutex 3y agoYou can do it with YouTube premium
- earthboundkid 3y agoOr use whatever YouTube-dl is called now.
- laingc 3y agoyt-dlp
- deleted 3y ago[deleted]
- superfish 3y agoI feel this comment in my very core. I have an unusually hard time remembering “yt-dlp”. Glad I’m not the only one
- ComputerGuru 3y agoI created a shell alias.
- earthboundkid 3y agoI just have to type yt and let shell history search find it for me every time.
- TylerE 3y agoUh, youtube absolutely has a save for offline viewing option.
- Lammy 3y agoLazy loading also allows any network operator (and FVEY et al) to surveil your progress reading any particular web page based on when the additional image requests are generated.
- rcme 3y agoHow are they inspecting your network traffic?
- deleted 3y ago[deleted]
- deleted 3y ago[deleted]
- hunter2_ 3y agoThey aren't going to see behind the TLS curtain, but they would see (assuming no DNS encryption) a domain name lookup followed by various traffic patterns; either: Bursts (page loads) with near silence in between, maybe just some non-human-triggered traffic from scripts that poll. Bursts (page loads) with quite a bit more of a human-triggered cadence in between, if lazy loading during scrolling occurs. But mouse-tracking analytics probably result in a similar leak, if not better.
- justin_oaks 3y ago> There's no way to disable Lazy Loading on Android Chrome or Android Firefox. I would think you could effectively disable lazy loading by using a bookmarklet for individual pages, or a userscript in Tampermonkey for whole sites or patterns of sites. It's not as simple of a solution as a browser option, but I figure solving your problem beats complaining about it.
- dools 3y agoIf you open an article on a train you could always scroll to the bottom of the page before you start reading it in order to load all the resources.
- hunter2_ 3y agoThere ought to be a "fringe reception mode" (extension, perhaps) which automates that, ideally without the user noticing. Just as TFA calls for.
- lxgr 3y agoTo me, that’s one of these “reading mode” apps. It works ok most of the time, but I really wish there was a standard for that that browsers could just implement, rather than these (often centralized) apps having to reverse engineer it. The one I use even belongs to a browser vendor, yet they’re trying to constantly upsell me a premium subscription.
- vhcr 3y agoThe decision here is completely on the hands of the user agent, use a browser that let's you disable lazy loading.
- donatj 3y agoI hate it soooo much. I've got Gigabit Internet and it makes it feel like I'm back on dialup waiting for images to load as I scroll rather than having the page ready for me.
- deleted 3y ago[deleted]
- smasher164 3y agoEven if network conditions are great, lazy loading breaks browser operations like "Find" with Ctrl-F. It's only gonna search what's in the viewport. I think lazy loading should only be used when there's an actually infinite stream of content to load. But stuff like the twitter replies section shouldn't be this way. I shouldn't have to scroll all the way down to make sure search works.
- hunter2_ 3y agoI'm not typically a Jira hater (I know, I know) but this is definitely a gripe I have with it. The backlog view lazy loads. Tiny little scraps of text! Ok so there's rank, priority, and maybe a few other data points to query for. But still, come on!
- chrismorgan 3y agoThis article is talking specifically about <img loading="lazy">, not progressively-loaded content, which is quite a different kettle of fish. (Specifically, everyone agrees progressively loading your content is to be avoided if possible, whereas “add loading=lazy to your images” is common performance advice.)
- ed_mercer 3y ago> lazy loading breaks browser operations like "Find" with Ctrl-F. It's only gonna search what's in the viewport Sort of. If you quickly add a letter and then remove it while the page is loading it'll refresh the results though (sort of like a React force re-render)
- SoulMan 3y agoI like such short article given the attention span I have these days. This could have been a tweet.
- pradn 3y agoHardly any app is designed for subway riders. If they were, we'd have widespread preloading (like half an hour of tweets pre-loaded), seamless delayed posting (sending a new post when the internet comes back online), and visibility into what's downloading and uploading so users can make informed choices. As with all accessibility affordances, this will help people beyond the targeted group - like air travelers, folks living in rural areas, or those out of the country without service. They say wifi coverage in trains is going take another 25 years in the NYC subway system. Until then, I hope we pay more attention to users with intermittent internet access.
- lstamour 3y agoI dunno, a number of apps I use on the subway are designed for such uses, including audiobook apps, podcast apps and many news apps (e.g. The Economist). But yes, other apps that could be designed that way may not work as well as they should. But even Netflix and YouTube can suggest downloads in advance now. Some apps will never be fully updated - for example, while the standard Mail app works great offline (it's getting it to connect sometimes that seems to take forever), the Gmail app always wants to upload a photo fully to the cloud before sending an email and this trips me up every time, because it never shows a progress indicator and it doesn't allow the email to be sent in the background before attachments upload. It's amazing how in 2023, we have all these engineering resources and lessons that can be learned from apps like WhatsApp, but we still build apps that assume always-on connectivity. It makes sense - even my local subway system is getting cellular service these days - but it's still doubly irritating if in an area with poor signal. (The signals poor, plus the app doesn't work or requires a re-launch, or... etc. etc.)
- knallfrosch 3y agoLove The Economist. They silently download the newest edition in the background, even when the app isn't open. I think a year ago the download was only triggered once you opened the page and went to "Weekly." Possible, but easy to forget.
- pradn 3y agoI'm with you - a lot of them are, but too many are not. I personally use the NYT and FT news apps in the subway quite a bit. In terms of pain points, the biggest is Safari. It gets rid of website state pretty quickly. I have tons of disk storage on my phone, why not serialize to disk? It could even be a "frozen" mode that still lets you scroll saved articles. It wouldn't be so useful for web apps, of course.'
- chrismorgan 3y ago> There's no way to disable Lazy Loading on Android Chrome or Android Firefox. I haven’t tested it, but I would expect that Firefox for Android would still support going to about:config and changing… hmm, looks like dom.image-lazy-loading.enabled is no more, so I suppose you can just set dom.image-lazy-loading.root-margin.bottom to an enormous number (probably don’t need to worry about top/left/right, but you can do them for good measure if you want).
- iggldiggl 3y agoIf you'd tested, you would have found that unfortunately access to about:config has been disabled on the release (and I think Beta, too?) versions of Firefox for Android.
- chrismorgan 3y agoBack when I was using Android, I ran Firefox Nightly, just like I do on my laptop, so I knew about:config worked! I was not aware it was disabled on release, which seems pretty roundly just a silly and unreasonable restriction.
- chupchap 3y agoWhy did we go from pre-rendered pages generated with multi-threading on a server to single threaded javascript sequential loading in the front end?
- afavour 3y agoThat has nothing to do with the complaint here.
- jiqiren 3y agoThis is a solved problem with Safari since at least High Sierra days. You add any webpage to your reading list and with appropriate settings you'll have a full local copy. https://support.apple.com/guide/safari/keep-a-reading-list-sfri35905/mac https://support.apple.com/guide/safari/keep-a-reading-list-s... relevant quote below... Save a page in your Reading List to read when you’re not connected to the Internet: Control-click the page summary in the sidebar, then choose Save Offline. You can also swipe left over the page summary, then click Save Offline. To automatically save all pages in your Reading List, choose Safari > Preferences, click Advanced, then select “Save articles for offline reading automatically.”
- deleted 3y ago[deleted]
- mcny 3y agoI would like something similar for Mozilla Firefox. On a very basic level, maybe Mozilla Firefox reader view can ignore the loading equals lazy hint and load all images. One step deeper, maybe we can keep these articles in some kind of local cache? Come to think of it, what happened with Pocket, that Mozilla acquired? We were supposed to open source the pocket server like five years ago. Did it happen? Does anyone even care about pocket (the read offline app) anymore? Edit: https://github.com/Pocket/extension-save-to-pocket/issues/75 https://github.com/Pocket/extension-save-to-pocket/issues/75
- acyou 3y agoSubway riders are a corner case. The amount of energy, bandwidth, resources saved with lazy loading must be staggering. Travellers may someday (and some do now) look back on losing signal with fondness. A time to reflect, meditate, plan, create, stop consuming for a little while, a welcome break.
- edent 3y agoSeveral million people ride the London Underground every day. https://tfl.gov.uk/info-for/media/press-releases/2022/february/latest-tfl-figures-show-continued-growth-in-ridership-following-lifting-of-working-from-home-restrictions https://tfl.gov.uk/info-for/media/press-releases/2022/februa... You're welcome to meditate if you want while crammed into a stranger's armpit. The rest of us would just like to read the news or catch up with our friends.
- eviks 3y agoIn what fantasy is loud subway a place to mediate and reflect?
- tobyjsullivan 3y agoSeems fixable at the standards level. The spec could define `loading="lazy"` as a (strong) hint for the client, but not a rule. Meanwhile, clients should allow disabling lazy loading. (The same way a valid client can disable Javascript, for instance.) This is only a partial solution as no more than a tiny minority would think to actually disable lazy loading. But at least there would be an option for the author and others who operate in contexts where the lazy loading is harmful.
- chrismorgan 3y agoIt is a hint, inasmuch as the behaviour depends on the lazy load root margin which is implementation-defined, with a handful of suggested factors to take into account in choosing the defaults. Disabling lazy loading is done by setting the lazy load root margin infinitely large. Relevant spec: https://html.spec.whatwg.org/multipage/urls-and-fetching.html#lazy-load-root-margin https://html.spec.whatwg.org/multipage/urls-and-fetching.htm.... In Firefox, you can control this by setting the dom.image-lazy-loading.root-margin.{top,left,right,bottom} prefs in about:config.
- mikae1 3y ago> There's no way to disable Lazy Loading on […] Android Firefox. about:config dom.image-lazy-loading.enabled
- aaomidi 3y agoThank you!
- edent 3y agoThat doesn't work on the Android version of Firefox. It goes to a blank page with no settings. See https://connect.mozilla.org/t5/ideas/firefox-for-android-about-config/idi-p/8071 https://connect.mozilla.org/t5/ideas/firefox-for-android-abo...
- chrismorgan 3y agoHuh. Excluded from stable? That’s a bit silly. I only used Nightly and it worked there last time I tried (maybe a year ago).
- mikae1 3y agoSorry, I use (and recommend) the Iceraven fork for Android. Works there.
- perilunar 3y agoIf the images are important to you, just scroll to the bottom of the article before reading to force the loading. Also: it's a pity that the lowsrc attribute was deprecated. I know there are alternative using JS, but it was useful.
- youngtaff 3y agoI’d like to see lowsrc return and renamed something like a placeholder attribute
- kazinator 3y agoImages are often junk though. What's better: to have the text of the article to read through the tunnel? Or some bullshit stock images that bear no relation to the story. In the now olden days of the internet, people on low-bandwidth connections used proxies that stripped away images.
- eviks 3y agoThe issue is, as usual, the lack of convenient user control to match the behavior best suited to that user's specific situation
- wruza 3y agoNot a subway rider, and I hate another form of lazy loading: webstore filters. You go to buypc.com, pc parts / ram, check 16GB box, it starts loading. Later you check 8GB (it starts loading), uncheck 16GB, it starts loading again, check “2x kits”. As you may have guessed already, it starts loading. You see the page and want to scroll it, but the second load finishes and the content changes. Then the third. If you want to filter a list by a handful of parameters, there will be almost the same amount of loads and re-renders, all insanely latent. A cherry on top - every time you check a box, load completion routine scrolls the page back to the top, so you miss a couple of clicks and check wrong checkboxes. The irony is that a full category list in json format that could be instantly filtered at the client side would be smaller in size than a couple of jpegs they serve with each product card. And that would make their servers rpm literally an order of magnitude less.
- djoletina 3y agoIf I understand correctly your beef is with the fact that they don’t have an “Apply filters” button and not lazy loading? Also they’re probably not trying to save bandwidth but database servers.
- RamRodification 3y agoNot OP, but I think the beef is that the act of applying a filter requires a reload of anything at all ("hey, server, please send me the list of only 16GB pairs this time"), when it's perfectly possible to just send the full list of items to the client initially and then have filtering apply instantly, client-side, on that already loaded list. At least that's the beef I have, and was reminded of when reading the parent comment.
- throwbadubadu 3y agoAlso not OP but yes... like how many bytes are saved here vs just getting the whole list vs how many bytes of js-bloat have been initially loaded vs user experience.. often very much out of any reasonable proportion providing nil value.
- rwoerz 3y agoI particularly dislike lazy loading if it is rather a form of procrastination, i.e., web frameworks and runtimes that defer class loading, initialization and the like until the first request comes in (as if there is hope that this would never occur) but report to be "started/ready" before.
- plaguepilled 3y agoIts not a fix, but whenever I have to travel I set up a "reading list" on my RSS feed. Between that and physical books, I tend to fill in the time. Actually, in general I would like to see RSS (or even a more draconic, constrained form of RSS) be a relevant web standard for traditional information dense webpages.
- HocusLocus 3y agoHow's this for "lazy loading"? My Kaios fake-android Alcatel flip phone (sold to me by Verizon) shows the "time" the moment you remove it from the pocket and open it up. Then you start counting to yourself: one one thousand, two one thousand, 3, 4, 5, 6... After about six seconds, sometime a little less, the display updates to show the current ACTUAL time. The one it shows before that could be 5,20,40 minutes or up to an hour and a half, AGO. I have never hated a phone so much. My hatred is palpable and intense. Of course the so-called-OS is the "latest" version which is only because Verizon abandoned it as soon as they rolled it out. And there are no options available that change this broken behavior.
- throwg 3y agoThis is why my country has no subways instead we have flyways
- jiofj 3y agoIn firefox you can set dom.image-lazy-loading.enabled to false
- fishywang 3y agoI wrote some code to convert links to epub, and those lazy loading images used in some websites used to be a huge pita to find the correct image file to be packed into the epub file, until I figured out a common enough way to handle them: https://b.yuxuan.org/lazy-loading-image-url2epub https://b.yuxuan.org/lazy-loading-image-url2epub
- theandrewbailey 3y agoOn my blog, I have a script that goes through lazy loaded images (which is all of them) and flips one to eager (in order down the page) every 5 seconds. Keep a page open for a minute, all images will be loaded, but if you close after 10 seconds, almost nothing extra is loaded.