Live data from Hacker News

Native lazy loading has landed in Chrome

dev.to

11–20 of 49 posts

Re: Native lazy loading has landed in Chrome

#11

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).

Hmm, maybe if websites don't use lazy loading JavaScript anymore (guilty as charged btw) then you'll be able to configure it however you want in browser settings?

I imagine anti-lazyloading extensions will start appearing soon.

Re: Native lazy loading has landed in Chrome

#14

`if ('loading' in HTMLImageElement.prototype === true) {` /rolleyes

I'm missing why this is a bad thing? It make polyfills way easier, and makes it drop-dead simple to programmatically toggle lazy-loading on existing elements.

I think the previous poster was referring to the unnecessary `=== true` part.

Re: Native lazy loading has landed in Chrome

#15

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).

[deleted]

Re: Native lazy loading has landed in Chrome

#17

Earlier quoted context omitted.

Hmm, maybe if websites don't use lazy loading JavaScript anymore (guilty as charged btw) then you'll be able to configure it however you want in browser settings?

I imagine anti-lazyloading extensions will start appearing soon.

And that's exactly why common API for lazyloading is awesome. It's a PITA to write such extension when everybody is using custom approaches for lazyloading. Once there's a common API, there will be a common approach to override it.

Re: Native lazy loading has landed in Chrome

#19

Earlier quoted context omitted.

I'm missing why this is a bad thing? It make polyfills way easier, and makes it drop-dead simple to programmatically toggle lazy-loading on existing elements.

I think the previous poster was referring to the unnecessary `=== true` part.

It's quite common to compare against "true" using "===" in JavaScript.

Re: Native lazy loading has landed in Chrome

#20
post #7

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.

just curious -- in what situation would your average user not have javascript turned on?
Post reply on HN