Monday, May 20, 2024
 Popular · Latest · Hot · Upcoming
117
rated 0 times [  124] [ 7]  / answers: 1 / hits: 44725  / 10 Years ago, mon, september 8, 2014, 12:00:00

This is a conceptual question. In my particular case, I am using slick.js to create an image carousel for a website. Since these are high resolution photographs, I want to speed up the page load time by allowing the photographs to be loaded asynchronously instead of on page load.



When looking through the documentation for this library, I saw the settings available for the 'lazyLoad' property with little information as to what those settings mean in practice.



Essentially my question is, what is the difference between progressive and on-demand in the context of lazy loading.


More From » jquery

 Answers
13

progressive: Loads the visible image as soon as the page is displayed and the other ones after everything else is loaded in the background (loads the visible slides on init, and then progressively loads the rest of the slides on window.load().). Should be used if the other images will be used most (or all) of the times the page is displayed.



on-demand: Loads the visible image as soon as the page is displayed and the other ones only when they're displayed. ([...] loads slides on demand. When a slide becomes visible (or on the before slide callback) the load is fired.) Should be used if the other images of the carousel are displayed very rarely.



Source: https://github.com/kenwheeler/slick/issues/35, especially jasonday's comment from 5. Apr


[#69527] Friday, September 5, 2014, 10 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
stephonkeandrer

Total Points: 392
Total Questions: 94
Total Answers: 100

Location: Tajikistan
Member since Sun, Aug 29, 2021
3 Years ago
;