Overview
Lazy loading is a performance optimization technique that reduces initial load time and saves bandwidth. It is commonly applied to images, videos, and JavaScript modules.
Common Applications
- Images: Only loading images as they enter the viewport (using the
loading="lazy"attribute or Intersection Observer). - Code: Loading JavaScript chunks only when a specific feature is used (see Code Splitting).
- Infinite Scroll: Loading more content as the user scrolls down the page.
Benefits
- Faster initial page load.
- Reduced data usage for users.
- Lower server load.