TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Native lazy loading has landed in Chrome

62 pointsby yeasayerover 5 years ago

13 comments

sharpercoderover 5 years ago
As a developer and systems architect, I really like this. As uset, I hate this so much. On slower connections, I like to load a page, swap tabs, come back later and expect the page to be loaded. This mechanism will now break (and is already brokrn by the usr of these lazy loading libs).
评论 #20798903 未加载
评论 #20800235 未加载
评论 #20799244 未加载
评论 #20800065 未加载
评论 #20800353 未加载
toastalover 5 years ago
I'm happy to see this. So many websites with lazy loading never implemented a fallback for noscript. And most of the popular libraries didn't account for this accessibility.
评论 #20799714 未加载
tyingqover 5 years ago
One watch out is that the lazy loading only grabs the first 2048 bytes. That gives you the dimensions of an image, which is a plus, but not the whole image, unless the image is tiny. That likely means more total connections. Probably fine for http/2 sites, maybe not so for non-http/2 sites. Would be interesting to see perf stats for that case.
kaycebasquesover 5 years ago
For anyone hearing about loading=“lazy” for the first time from this article , I’ll reiterate the main idea because the article doesn’t go into much depth about the motivation.<p>The main idea is that some pages use a lot of cellular data to load images that are further down the page, out of the viewport. If the user glances at the page and decides it’s not relevant and exits, then those offscreen images were just a waste of cellular data. loading=“lazy” addresses this problem by deferring the image loads until the user has scrolled the page and the image is soon to be in the viewport.<p>Disclosure: I write the Chrome DevTools docs
评论 #20800514 未加载
Volundrover 5 years ago
I may be the odd one out here, but I hate lazy loading. I get why it&#x27;s a big thing on cellular connections, but I do most of my browsing on WIFI. With lazy loading I&#x27;ll frequently be reading an article, reach an image that hasn&#x27;t loaded in yet, and have to wait for it, even though I&#x27;ve been reading for several minutes. Sometimes I also have to refind my place as the whole darn page reflows.<p>I wish there was a middle ground... detect I&#x27;m on WIFI and go ahead and load in the lazy stuff after the above the fold stuff.
5-over 5 years ago
Link could be replaced with the original from which all content was plagiarised?<p><a href="https:&#x2F;&#x2F;web.dev&#x2F;native-lazy-loading" rel="nofollow">https:&#x2F;&#x2F;web.dev&#x2F;native-lazy-loading</a>
outside1234over 5 years ago
Edge will pick this up going forward as it is based on Chromium.
评论 #20799728 未加载
tspover 5 years ago
Seems like the image service the author is using is down because of traffic…<p><a href="https:&#x2F;&#x2F;placedog.net&#x2F;400&#x2F;400" rel="nofollow">https:&#x2F;&#x2F;placedog.net&#x2F;400&#x2F;400</a>
评论 #20799410 未加载
wereHamsterover 5 years ago
`if (&#x27;loading&#x27; in HTMLImageElement.prototype === true) {`<p>&#x2F;rolleyes
评论 #20799149 未加载
Dutchie2020over 5 years ago
Nice, native deferred rendering for style sheets next please!
zsrxxover 5 years ago
Good. I hate lazy loading. I hope they add an option in the browser so I can disable it globally.
评论 #20799957 未加载
milad_nazariover 5 years ago
English isn&#x27;t my first language but shouldn&#x27;t it be &quot;... has landed in Chrome&quot; instead of &quot;... is landed in Chrome&quot;?
评论 #20798919 未加载
d--bover 5 years ago
This is a poorly thought feature.<p>You always want to have the image loaded before you actually use it. You don&#x27;t want to wait until you actually use the image. For instance in a carousel, you&#x27;ll want to load the next and previous image, not just the current displayed one.<p>I&#x27;d much rather have a &quot;loading order&quot; than lazy loading. Sure, I don&#x27;t want to load first the big images that I&#x27;ll want to display later, but I definitely don&#x27;t want them to appear while I scroll down...
评论 #20800669 未加载