Google Chrome Canary Adds 'Lazy Loading' For Lightning Quick Page Rendering
Although it might sound like an oxymoron, lazy loading is anything but "lazy" with respect to speed. With the public channel release of Chrome (and all versions that came before it), the browser will render all elements of a webpage as soon as it's opened. However, in the newest build of Chrome Canary, the browser will only load elements of a page that are currently visible on the screen at that given time.
All content that is "below the fold" or not visible to the user is not rendered until the user scrolls down the page towards the object. Elements that are left out of the initial page loading include images and iframes that are below the fold (although "invisible" placeholders are used until those elements are needed).
You can enable lazy loading by navigating to chrome://flags and turning on the following two flags:
Google Chromium engineers wrote earlier this year, "Content that is not visible because it is below the fold should commence loading just in time to complete when scrolled to it. The specific goal of this project is to greatly reduce the number of image and third-party iframe resources necessary to load a site by using visibility predictions to trigger their loading."
With lazy loading, content beneath the fold will begin loading as the user scrolls towards the edge of a "deferred object" on a page that is within a "K pixel" distance of the currently viewable area. This K pixel distance is variable depending on a number of factors including the following:
- Frame vs. image
- Whether Data Saver is enabled or disabled
- The current network's effective connection type
Google says that lazy loading not only speeds up page loads, but also reduces data usage (which is especially pronounced if you don't scroll all the way down a page to see all visible content) and that it reduces overall memory usage. For anyone that has used Chrome for any length of time, you know that anything that reduces the web browser's memory footprint is a plus.