看啥推荐读物
专栏名称: 前端早读课
我们关注前端,产品体验设计,更关注前端同行的成长。 每天清晨五点早读,四万+同行相伴成长。
今天看啥  ›  专栏  ›  前端早读课

【英】网页的图片延迟加载

前端早读课  · 公众号  · 前端  · 2019-04-20 06:46
前言古老的功能越来越多被浏览器所实现。本期英文来自@Addy Osmani分享。正文从这开始~~n this post, we’ll look at the new loading attribute which brings native and  lazy-loading to the web!. For the curious, here’s a sneak preview of it in action: src="celebration.jpg" loading="lazy" alt="..." /> src="video-player.html" loading="lazy">We are hoping to ship support for loading in ~Chrome 75 and are working on a deep-dive of the feature we’ll publish soon. Until then, let’s dive into how loading works.IntroductionWeb pages often contain a large number of images, which contribute to data-usage, page-bloat and how fast a page can load. Many of these images are offscreen, requiring a user to scroll in order to view them.Historically, to limit the impact offscreen images have on page load times, developers have needed to use a JavaScript libra ………………………………

原文地址:访问原文地址
快照地址: 访问文章快照