前言古老的功能越来越多被浏览器所实现。本期英文来自@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
………………………………