What is Lazy Loading ?

Lazy loading is an optimization technique whereby we delay the load of an object(image, video, audio, documents) until when it is needed.

When a user opens a webpage, all the contents are downloaded in one fell swoop. Most of the contents may never be interacted with or seen by the user. So why waste precious time, resources and bandwidth?

To boost the response time of our site, we do not load some non-critical parts of our app at load time. These resources are then loaded when the user accesses part of the page that requires it.

Example: You have a blog with a very long paragraph and so many images and videos in it. When a user opens the blog, only those images and videos will be loaded which are currently visible on the screen and the rest resources will be loaded once the user scroll down to read the next part of the blog. This will reduce the load time of the blog and will help to improve the performance.

No comments

Powered by Blogger.