Lazy Load VS infinite scrolling

房东的猫 提交于 2020-01-23 05:22:10

问题


I thought Lazy Loading and infinite scrolling are same things, But today I heard that these are two different things. Is that true?


回答1:


Lazy loading refers to deferring loading of any kind of content until it becomes necessary. For example, on a long page, images which are not currently visible do not need to be loaded. Only when the user scrolls the page over or near them do they get fetched from the server.

Infinite scrolling refers to new content being loaded when the end of the page is reached, so the effect of an infinitely long page is created (mostly to avoid tedious paging).

So yes, they're different, but related.




回答2:


Infinite Scrolling is one of the methodology by which we can achieve Lazy Loading.

Lazy loading means the request for the resource or records will be made only when they are demanded.

In case of Infnite Scrolling ,the request for the next set of records will be made only when scroll bar reaches bottom of th grid and fires request to load the next set of records.

So,well you can consider Infinite Scrolling is the technique by which Lazy loading is achieved.

Note: Infinite scrolling is not only the way to achieve Lazy Loading. there are many other ways of achieveing it. For ex: Demand Paging

Hope this helps..Thanks



来源:https://stackoverflow.com/questions/21676417/lazy-load-vs-infinite-scrolling

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!