DEV Community

Discussion on: Native lazy loading is landed in Chrome πŸ”₯😍πŸ”₯

Collapse
 
ben profile image
Ben Halpern

Great writeup!

auto: Default behaviour of the browser, equal to not including the attribute.

I've had trouble being sure about this as written in different places. Is the auto value going to be as if this feature never existed or does it mean that the browser will choose the behavior and things still might be "lazier" than they had been in the past?

...does that question make sense?

I really really like this. DEV implemented this feature as soon as we possibly could.

I just did a quick pass to get it in some images, still need to go through more of the site and implement this in more places, especially with iframe embeds.

Collapse
 
link2twenty profile image
Andrew Bone • Edited

Auto, for now, will be the same as eager but the browser makers will get to choose.

Indicates a preference for the user agent to determine the fetching strategy (the default)

github.com/whatwg/html/pull/3752/f...

Collapse
 
yashints profile image
Yaser Adel Mehraban

Thanks Ben, the auto means you are delegating the responsibility to the browser. As I mentioned, each browsers has a different way of dealing with depriotising offscreen resources, so they will use it. Also if a browser doesn't have any strategy (which is possible) then it's equal to eager