具有HTML加载属性的本机延迟加载的风险? [英] Risks of native lazy loading with the HTML loading attribute?

查看:46
本文介绍了具有HTML加载属性的本机延迟加载的风险?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

浏览器最近开始通过 loading 属性支持本地延迟加载.

Browsers started recently supporting native lazy loading via the loading attribute.

但是,许多图像繁重的网站(例如unsplash.com和pexels.com)并不使用本地延迟加载.

However, many image heavy sites like unsplash.com and pexels.com don't use native lazy loading.

显然,并非所有浏览器都支持本机延迟加载,但是除了其他用于延迟加载的选项之外,使用 loading ="lazy" 的风险还有哪些?也就是说,如果您接受不受支持的浏览器不会延迟加载图像,那么将 loading ="lazy" 添加到 img 标签是否有任何不利之处?

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? That is, if you accept that unsupported browsers won't lazy load images, is there any downside to adding loading="lazy" to img tags?

推荐答案

由于chrome中的错误,第一个支持本机延迟加载的浏览器,由于此错误.

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.

这篇关于具有HTML加载属性的本机延迟加载的风险?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆