https://addyosmani.com/blog/lazy-loading/原文就不转了,也没啥好多说的:
<img src="celebration.jpg" loading="lazy" alt="..." />
<iframe src="video-player.html" loading="lazy"></iframe>
其它
1.没提其它浏览器
2.当前版本可通过 chrome://flags 打开 Enable lazy frame loading 和 Enable lazy image loading 体验
3.技术细节:DevTools: An implementation detail of loading in Chrome is that it fetches the first 2KB of images on page-load. It fetches the rest of the image byes when the user is about to see them. This can result in (1) double fetches to 'appear' in the DevTools Network panel and (2) Resource Timing to have 2 requests for each image.
--
修改:eGust FROM 101.98.83.*
FROM 101.98.83.*