Chrome adds support for lazy loading iframes

Chrome Browser Developers сообщили about extending the means for lazy loading of web page elements, allowing not to load content that is outside the visible area until the user scrolls the page to the place immediately preceding the element. Earlier in Chrome 76 and Firefox 75 this mode was already implemented for images. Now Chrome developers have taken it one step further and added the ability to lazy load iframes.

To manage lazy loading of pages, the "loading" attribute has been added to the "iframe" tag, which can take the value "lazy" (delay loading), "eager" (load immediately) and "auto" (delay loading at the discretion of the browser, when the mode is turned on). Lite). It is expected that lazy loading will reduce memory consumption, reduce traffic and increase the speed of the initial opening of pages. For example, when the new mode is enabled, blocks with ads and Twitter, Facebook, and YouTube widgets will immediately stop loading if they are not visible to the user until the user scrolls the page to a position in front of these blocks.

Chrome adds support for lazy loading iframes

According to developers, on average, deferred loading will save 2-3% of traffic, reduce the number initial renders by 1-2% and reduce delay before input is available on 2%. For specific sites, the changes are more noticeable. For example, enabling delayed loading of a YouTube block will result in a decrease in downloaded data by approximately 500KB, Instagram by 100KB, Spotify by 500KB, Facebook by 400KB. In particular, the use of lazy loading of youtube blocks on Chrome.com allowed mobile devices to reduce the waiting time for pages to start interacting by up to 10 seconds and reduce the size of the initially loaded JavaScript code by 511KB.

Chrome adds support for lazy loading iframes

Source: opennet.ru

Add a comment