![]() Using scroll, resize, or orientationchange event handlersĮither option can let developers include lazy loading functionality, and many developers have built third-party libraries to provide abstractions that are even easier to use.Previously, there were two ways to defer the loading of off-screen images: ![]() At the 90th percentile, sites send about 4.7 MB of images on desktop and mobile. ![]() Why browser-level lazy loading? #Īccording to HTTPArchive, images are the most requested asset type for most websites and usually take up more bandwidth than any other resource. Browser compatibility #īrowser support chrome 77, Supported 77 firefox 75, Supported 75 edge 79, Supported 79 safari 15.4, Supported 15.4 Sourceīrowsers that do not support the loading attribute simply ignore it without side effects. In Chrome 76 onwards, you can use the loading attribute to lazy-load images without the need to write custom lazy loading code or use a separate JavaScript library.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |