简体   繁体   English

使用 HTML 加载属性进行本机延迟加载的风险?

[英]Risks of native lazy loading with the HTML loading attribute?

Browsers started recently supporting native lazy loading via the loading attribute.浏览器最近开始通过loading属性支持本机延迟加载

However, many image heavy sites like unsplash.com and pexels.com don't use native lazy loading.然而,许多像 unsplash.com 和 pexels.com 这样的图像重的网站不使用本机延迟加载。

Obviously, not all browsers support native lazy loading, but what are the risks of using loading="lazy" in addition to other options for lazy loading?显然,并非所有浏览器都支持原生延迟加载,但是除了延迟加载的其他选项之外,使用loading="lazy"的风险是什么? That is, if you accept that unsupported browsers won't lazy load images, is there any downside to adding loading="lazy" to img tags?也就是说,如果您接受不受支持的浏览器不会延迟加载图像,那么将loading="lazy"添加到img标签有什么缺点吗?

Due to a bug in chrome, the first browser to support native lazyloading, images that have not yet been loaded will be missing in the printout due to this bug .由于第一个支持原生延迟加载的浏览器 chrome 中的一个错误,由于这个错误,尚未加载的图像将在打印输出中丢失。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM