I'm working on a long scrolling website that features a number of full background hi res images. It's currently taking too long to load since all the images are loaded in parallel by default.
So before I custom write something to load first what comes first and later what comes later (this way the first scroll will load almost instantly and the user will wait for the remaining part while reading the first part :P), is there any script that will do this out of the box?
I'm thinking on some existing code that will read each img
tag or background-image
property/style-attribute and load the images sequentially depending on their appearance on HTML or a some extra attribute.
I prefer vanilla JS or jQuery. If I can't find it, I'll write a plugin myself, votes/encourages accepted!