How to upload images sequentially?

I am working on a long scroll website that has some full screen greetings. It currently takes too long to load, since by default all images load in parallel.

Therefore, before I write anything, to download first what comes first and then what happens later (in this way, the first scroll will load almost instantly, and the user will wait for the rest when reading the first part: P) is there any script that will make this out of the box?

I’m thinking about some existing code that will read each tag imgor background-imageattribute of a property / style attribute and load images sequentially depending on their appearance in HTML or some additional attribute.

I prefer vanilla JS or jQuery. If I can’t find it, I will write a plugin myself, vote / approve!

0
source share
2 answers

I created a jQuery plugin for this. Check this! This is a work in progress, so you can comment and suggest! I took a lot from Lazy Load .

https://github.com/mspivak/sequencial_load

+1
source

I would try using a plugin like LazyLoad: http://www.appelsiini.net/projects/lazyload

, . , , .

+1

All Articles