Don’t Be Lazy: 3 Problems with Lazy Loading and When to Use Eager Loadingby@gilad-david-maayan
6,075 reads
6,075 reads

Don’t Be Lazy: 3 Problems with Lazy Loading and When to Use Eager Loading

by Gilad David Maayan4mDecember 25th, 2020
Read on Terminal Reader
Read this story w/o Javascript
tldt arrow

Too Long; Didn't Read

Lazy loading is a technique used to delay the initialization of page elements. It is typically better performance and a reduction in cost, because pages are loaded faster. This article explains three critical lazy loading issues and explains when you should use eager loading. The majority of web browsers support lazy loading, but lazy loading is not a perfect solution. The solution is to use an API to detect images entering the viewport. Add a margin to images. You can define the margin by setting a bounding box via the rootMargin.

Company Mentioned

Mention Thumbnail
featured image - Don’t Be Lazy: 3 Problems with Lazy Loading and When to Use Eager Loading
Gilad David Maayan HackerNoon profile picture
Gilad David Maayan

Gilad David Maayan

@gilad-david-maayan

Technology Writer and Startup Advisor

Learn More
LEARN MORE ABOUT @GILAD-DAVID-MAAYAN'S
EXPERTISE AND PLACE ON THE INTERNET.
L O A D I N G
. . . comments & more!

About Author

Gilad David Maayan HackerNoon profile picture
Gilad David Maayan@gilad-david-maayan
Technology Writer and Startup Advisor

TOPICS

THIS ARTICLE WAS FEATURED IN...

Permanent on Arweave
Read on Terminal Reader
Read this story in a terminal
 Terminal
Read this story w/o Javascript
Read this story w/o Javascript
 Lite