- What is the strategy for loading image resources only when required to display called?
- How are images loaded in browser?
What is the strategy for loading image resources only when required to display called?
Lazy loading is a strategy to identify resources as non-blocking (non-critical) and load these only when needed. It's a way to shorten the length of the critical rendering path, which translates into reduced page load times.
How are images loaded in browser?
Images on a webpage can be loaded in two ways - using the <img> tag, or using the CSS `background` property. Let's first look at the more common of the two, the <img> tag, and then move on to CSS background images.