Your experience on this site will be improved by allowing cookies.

Lazy loading background images to improve load time performance
Megtekintés: 82
PHP JavaScript

loading=lazy is great for the src value of an image, but what about background images? These are typically declared via a background-image:url() css rule, which can't currently be controlled by a loading attribute. For background images use IntersectionObserver. This JS-based object is similar to the old js-based plugins hooked into scroll events.


Hozzászólások