View Full Version : Load images in a certain order?
01-24-2007, 01:31 PM
I am looking for a script that can load the images in the order I want them to be loaded.
I added a new picture to a site I am making and it is placed in the top of the page.
The problem is because it is the newest one it's loading all the other images
before this one, or maybe because of another reason?
But because this is the first image the viewer see I want it
to load first and not last.
Is there a script that can give me the possibility to choose which picture loads first,
or a script that will load first the picture that was added last?
01-25-2007, 06:31 AM
I've noticed things like that. You could try preloading it in the head of the page:
var pimg=new Image();
1 ) Regardless of where the image appears in the layout, make sure that it appears before all others in the HTML markup code of the page.
2 ) Download all of your images that appear on the page. Then delete them all from the server. Then upload them to the server, one at a time, in the order in which you want them to be served.
01-25-2007, 08:58 AM
var myimages=new Array()
//Enter path of images to be preloaded inside parenthesis. Extend list as desired.
01-25-2007, 12:05 PM
That is not what I said. I said that if you want a particular image to display first on a page, preload only that image and do it in the head. I think that if you preload all of the images, there is a good chance that they will simply be served in the same order as they were uploaded to the server, not really changing anything, or perhaps delaying the onset of the loading of the page's content until all images are cached - still not the result I think we are looking for here.
01-26-2007, 01:17 AM
Thank you for both your replies,
I see it's not as simple as I thought it should be,
and on the other hand not as hard as I might think it is.
I will give it a go and see how it go's.
Thank you very much.
Powered by vBulletin® Version 4.2.2 Copyright © 2016 vBulletin Solutions, Inc. All rights reserved.