Ultimately, loading while parsing HTML, using javascript / jquery preloading or using ajax, is done at the same time, especially if the image is large (if it isnβt, don't you ask?).
The system should open a connection, make a GET request for the file, and the file is transmitted over the network. If it is cached, it is not relayed. Network transfer is a bottleneck, and different boot methods do not change this.
You will affect the user timeout in two ways:
Reduce the size of your media, for example. use thumbnails, be smart when compressing, reuse large files so you use caching ...
Image loading time is thorough, which is what image preloading does (with or without AJAX, it's the same thing). It is probably not possible to know exactly when to start downloading the image so that the user does not wait. Uploading three images in advance, as you suggest, sounds good to me. Users can wait from time to time, but even more bust.
For a slide show, you can have an array that will remember which images are uploaded, like thumbnails or fully loaded, which ensures that you will not make unnecessary repeat requests.
I really did not give you the magic bullet ... There is no one, but I hope this helps.
boisvert
source share