<img loading="lazy"> 关于内存消耗的行为

behavior of <img loading="lazy"> regarding memory consumption

我听说 chrome 已经为 "img" 元素实现了原生延迟加载,而且 firefox 很快就会效仿。

我找到的解释是,当你给 img 元素添加一个属性 loading="lazy" 时,它只会在浏览器认为它时请求 src url "close"到视口,"close"的定义取决于实际可用带宽。

我的问题实际上是关于内存消耗的。在实际加载延迟加载的图像并且它距离视口足够远之后,浏览器是否会释放内存,在必要时再次延迟加载(大概是从磁盘缓存)?

https://whatpr.org/html/3752/urls-and-fetching.html#lazy-loading-attribute

The attribute provides a hint to the user agent to aid in deciding whether to fetch a resource immediately or to defer fetching until the element will be viewable, according to the attribute's current state.

根据我对规范的解释,loading 属性只影响服务器对特定资源的初始请求。它不决定资源的呈现方式。