IntersectionObserver でオフスクリーンの画像を遅延読み込みする

Posted on 2018/12/03 in tech • Tagged with javascript, seo

Google の PageSpeed Insights が新しくなっていた。

で、改善案の一つに Offscreen Images のセクションがあったのだけれど、こう書いてあった。

Consider using an IntersectionObserver to intelligently determine when to lazy-load offscreen images. For example, suppose you have some images at the bottom of a very long page. With an IntersectionObserver, you can load the images only when the user …


Continue reading