Lazy loading is a programming technique that delays loading resources until they are needed. A common example is a webpage that defers loading images until the user scrolls to their location within the page. Lazy loading is used on the web and in software programs, such as mobile and desktop applications.
Lazy Loading on the Web
Lazy loading video is also popular on the web. It is especially effective since video files are typically the largest resources loaded within a webpage. Instead of sending the entire video to a client's device, the web server only sends small portions of the video while the user is watching it. Popular video sharing websites like YouTube and Vimeo use lazy loading to reduce bandwidth and to prevent users from downloading more video content than necessary. This is especially helpful for users with metered Internet connections, such as mobile data plans.
Lazy Loading in Software Programs
While lazy loading has become increasingly popular on the web, it has been used in software development for a long time. For example, an operating system may only display thumbnail images for the visible icons in a folder. Similarly, an image viewing program may only load the visible images in a photo library. This uses less memory and improves application performance because the program does not load unnecessary data.