25 ms·
Lazy loading can be frustrating when the connection between the website and your browser is slow. I come across this from time to time and the result is that ev
by amanzi 7y ago
Lazy loading can be frustrating when the connection between the website and your browser is slow. I come across this from time to time and the result is that every time you scroll down, you have to wait ages for the next set of images to load.
- scarejunba 7y agoBut that's why it's so important that it be part of the HTML spec. Previously, it would have to be implemented in Javascript. Now, you could configure your User Agent to ignore the attribute and eager load. That way you get the behaviour of always-load and the rest of us get fast loading pages. This is a Pareto move.
- taeric 7y agoDo we really expect people will be configuring their User Agent to ignore this attribute? Seems, wishful thinking.
- scarejunba 7y agoIf they're annoyed they'll go on the Internet and find out how to do it. Defaults should be useful to the many, and the few can reconfigure their UA. Think about all the use-cases you could build. Maybe you could later set "I'm on a metered connection" at the OS level, have your browser pick that up, and not overuse your metered connection, etc. etc. Maybe you could have that in a browser extension that you manually toggle. No, this is far too useful.
- taeric 7y agoI'm still skeptical. Is there any precedent for similar features that are used today? Closest I can think of is turning off JavaScript. Which this seems made to combat, honestly. And, honestly, I doubt that has penetration worth talking about. And again, just don't put so many giant graphics on a page. Problem mostly solved. With less tech and likely faster results.
- scarejunba 7y agoPlease read the spec. Your accusation of this being intended to defeat turning off JS is dealt with here[0]. It's only a +188 -66 patch and eminently readable. If you are discussing this without reading it, this is going to be an unproductive discussion. 0: https://github.com/whatwg/html/pull/3752/files#diff-36cd38f49b9afa08222c0dc9ebfe35ebR28107 https://github.com/whatwg/html/pull/3752/files#diff-36cd38f4...
- taeric 7y agoThe size is a non sequitor. This is something that otherwise requires javascript. Full stop. No? Now, I don't actually think this is being done to sidestep people that turn off javascript. Mainly because I just don't think that is a market worth worrying about. But I can't see why this is a feature that we need. Progressive loading, I could almost see. But by and large, high resolution images are just not compatible with high speed page loads. I'm not seeing how this feature actually changes that.
- scarejunba 7y agoThe link is to the part of the diff that enforces that it behaves identically to current unannotated tags when Javascript is disabled. Obviously if it's designed to be no different from the current state when JS is disabled then it can't combat disabling JS.
- taeric 7y agoSee, for me, disabling it would be not eagerly loading anything. This is literally putting the site into what is assumed the least optimized state of scripts are off. Ironic, as typically scripts off should be faster.
- anoncake 7y agoWhy should built-in lazy loading combat turning off Javascript? It means less pages will be broken when you do that.
- stevenwliao 7y agoI want a browser that can predict when I'll have patchy Internet, loading and prefetching as much as possible right before.
- taeric 7y agoI want pages that can load in less space. When most of my Kindle books download faster than most web pages, there is a serious problem.
- edmundsauto 7y agoNo there's not. Web bloat is a problem, but it's not useful to compare media-rich audio-video capable applications with the lightly formatted, text-only, Kindle book format.
- egypturnash 7y agoIt’s also not useful for a web page you’re visiting for a few tens of kilobytes of text and a few images to be a media-rich audio-video capable application full of trackers and ads-that-might-be-malware.
- taeric 7y agoI'm comparing content to content. Yes, some is media rich, but if I want media heavy, I'm likely using Netflix/Youtube or similar anyway. If I'm using a web page, I actually actively don't want media heavy content. And you can get graphic novels on Kindle nowadays. To pretend it is just text is to undersell the formats now. Could I claim they are bloating? Certainly. Still have a long way to go before they reach current web browser bloat. Which only seems to be marching on. With no signs of restraint on what to pursue.
- Kaiyou 7y agoWell, in my book webpages are there to display mainly text and maybe an image. So the comparison seems useful to me.
- 7y ago
- marcosdumay 7y agoNah. We only expect Firefox to listen to their use-base and disable it everywhere. And with some extra noise, maybe the Chromium based browsers follow.
- plorkyeran 7y agoIf Chrome disables lazy loading by default then web sites will continue to just use javascript lazy loading as they do today. Disabling lazy-loading in your browser is inherently something that can only be useful if it's not the default.
- toastal 7y agoThis is another good case for progressive images as at least you'll get something on the screen.
- gjsman-1000 7y agoThis is hands-down the best part of this for me. I can't stand Medium.com and blogs like it, because the images are almost always smeary placeholders unless I want to wait for, like, a whole 60 seconds. And my internet connection is 18mbps! I'd turn off lazy loading in a heartbeat!
- taeric 7y agoWon't turning off lazy loading just make the whole page go slower to load? You are having to queue up connections at some level, just saying not to do it lazily is just asking to download a ton of crap you could skip out on. Or worse, putting it in contention with the rest of the stuff you are downloading. (Imagine opening several tabs on large stories with tons of images now set to eager load. First thing the browser will likely do, is ignore requests from other tabs. Then, you are just back to the game of the page not loading till you get to that tab.)
- radarsat1 7y agoMy use case is predownloading an article before getting on the subway. Sure it's better to lazy load the images in the common case, but the rare cases where the equations and explanatory diagrams are just blurry smears when you are out of 3g range are really annoying. Having the whole article + images download in the background while you are on another tab would be just fine in those cases. As it stands, I have to pre-swipe an entire Medium article and then go all the way back up to start reading it, if I want to make sure I can keep reading it when the subway is in certain parts of the track.
- IggleSniggle 7y agoI just have a bad/unreliable connection, and wish websites would GET while the GETtin is good.
- taeric 7y agoStrictly, I'd agree it is better to preload all content for the article. Sadly, that shouldn't include pictures there just for space. Would be a neat audit to do daily. How many images downloaded contributed to your stories or day?
- jameslk 7y agoThe point of lazy loading images is generally to spare the browser from making a bunch of upfront requests to below the fold content, thereby making it so the page and content in the viewport is ready faster. If images aren't ready by the time you scroll down, this is more an issue with the particular implementation of lazy loading, but the concept is sound.
- stkdump 7y agoForgive my ingorance, but wouldn't that mean that the browser has to load images in the correct order? So instead of delaying the load until the image is in view, just prioritize loading based on how far up/down the page an image is? If yes, couldn't the browser implement it without any additions to html?
- ioulian 7y agoIt's not that easy. It's not always that you scroll gradually to the bottom of the page. If you click the scrollbar to the bottom, then the middle images shouldn't load. The same if you use hash navigation to the bottom. If you refresh the page at the bottom, it will stay at the bottom, so no need to load top images.
- stkdump 7y agoOk, but either way, isn't that logic that browsers could apply without changes to html?
- greggman3 7y agoI always thought the point of lazy loading is to save the company serving the on bandwidth costs. AFAIK it's never been a good user experience scrolling down and then having to wait for images to load.
- shakna 7y agoIn any decent implementation, the lazy loaded images should be loaded before you scroll to them, unless you're jumping halfway down a page. They don't just load what's visible, but also the next section that it's expected you'll scroll to.
- runarberg 7y agoThis is a classic case of “But Sometimes”[1]. I guess sometimes lazy loading of images can be frustrating, but most of the times it’s not. 1: https://www.youtube.com/watch?v=GiYO1TObNz8 https://www.youtube.com/watch?v=GiYO1TObNz8
- compumike 7y agoThis is mostly solvable. I recently deployed lazy loading for schematic images on https://ultimateelectronicsbook.com/ https://ultimateelectronicsbook.com/ and configured IntersectionObserver (with polyfill) to have a rootMargin equal to 3*window.innerHeight (see https://developer.mozilla.org/en-US/docs/Web/API/Intersection_Observer_API https://developer.mozilla.org/en-US/docs/Web/API/Intersectio...). Under most reading and even fast-scrolling conditions, the image will be loaded well before it is scrolled into view. But I will agree with the sentiment -- I find it incredibly annoying on pages that do lazy loading and don't implement this enlarged intersection check to make it appear seamless.
- ampdepolymerase 7y agoYour book looks really great, how does it compare with the classic AoE?
- compumike 7y agoWow, thank you! I think Art of Electronics reads well for people who already have some theory and are ready for a more practical guide. Currently, I'm aiming to build in just a bit more theory/math/background than that, so it can be usable for an undergrad college course, for example. I think AoE really lives up to the "Art" part of the title, and that's probably why it's so beloved.
- vnorilo 7y agoYour book looks like a potentially great resource for teaching electronics to music tech students. I will follow your progress! Thank you for sharing.
- greggman3 7y agoAnyone know any books that go the opposite order? Start with interesting working projects, add in the theory as needed to adjust the projects. To learn photography I'd prefer starting with a camera. Not withe theory of light or the properties of atoms that allow glass to be transparent or how lenses are ground. Similarly, if possible, to learn electronics i'd like to start at a higher level and work down rather than bottom up.
- mr__y 7y agoLazy loading as a standard would actually make it much easier to modify lazy loading behaviour through browser config and/or addons. Now you are at a mercy of website creator, with a standard and the ability to modify default behaviour through a config you could possibly just switch off lazy loading if thats better for you
- abruzzi 7y agothis is what I'm hoping since lazy loading is constantly an issue for me (where I live my internet is frequently less than ideal.) Unfortunately my issues are more apparent with content lazy loading, and less with image lazy loading.
- GoblinSlayer 7y agoI suppose it takes ages because it's many(!) sets(!) of huge(!) images. Not sure if eager loading will help with load time, and it sounds like a huge waste if you didn't see all that enormous loaded stuff.
- radarsat1 7y agoEspecially when you temporarily lose internet connection -- for example when on some parts of the subway -- which is typically when you want your whole article downloaded beforehand -- especially for example when said images are not just decoration but part of the content for example the equations that explain what you are trying to read about.