loading="lazy"
The value loading="lazy" tells the browser to wait before it loads an iframe or image. The browser loads it only when it comes near the visible part of the page.
HTML attribute
Also called Lazy iframes, Lazy loading
Updated
On this page
Example
HTML
<iframe src="https://widget.example/map" title="Store map" width="600" height="400" loading="lazy" ></iframe>
The frame starts to load when the visitor scrolls near it.
How to use it
Add loading="lazy" to frames far down the page. Keep loading="eager", the default, for frames that show at once.
<iframe src="https://widget.example/map" title="Store map" loading="lazy" ></iframe>
A lazy frame in a closed tab or a hidden modal may never load. Set loading="eager" or add the frame when it shows.
Learn more
Sources