A while back I enabled lazy loading for images on Liliputing in an attempt to help reduce the amount of time it takes to load the website. What that means is that when you first visit a website, your browser doesn’t need to render all the content on the site at once — images that aren’t “above the fold” will only be loaded when you scroll down the page.
Plenty of websites do this… but it’s generally been up to web developers to enable lazy loading.
Now Google is building the feature into its Chrome web browser — future versions of Chrome will automatically lazy load images and iframes by default, unless a web developer includes code that tells the browser to do something different.
Basically Google is adding support for a new “loading” attribute which will let web publishers choose from one of three values:
- lazy – Content is a good candidate for lazy loading
- eager – Content should be loaded right away.
- auto – The browser should determine whether to lazy load content or not.
If the website doesn’t specify a value, Chrome will default to auto, which means that odds are the browser will automatically lazy load images on many of the billions of websites that are already out there (and which are unlikely to be updated with the new attributes anytime soon).
Hopefully that means faster page load speeds across the board.
The new behavior could be included in Chrome 75, which is scheduled for release in May, and it should be available for Windows, Mac, Linux, Chrome OS, and Android versions of the web browser as well as other web browsers that use the Blink rendering engine.
So far no other browsers (such as Firefox or Safari) have announced plans to support the new loading attribute, but that could change in the future.