Log in

View Full Version : Image Preloader II



Levi
08-26-2005, 03:28 PM
i have followed the instructions for the image preloader, but when i go onto my page - http://www.speedymodels.com - it doesnt actualy pre-load the image, the box comes up after the images has loaded, can anyone help me ?

thanks :)

jscheuer1
08-26-2005, 04:01 PM
This little bit of code at the end of the script:

window.onload=loadimages;

means that nothing really happens until the page has loaded. This also means that this script is for preloading images that will be used on another page or for some dynamic effect on the current page. Additionally, preloading an image on a page where it appears does nothing to speed its loading. Whether preloaded or simply loaded, an image takes the same amount of time to download. The only advantage to preloading images on a page where they are used is if those images are used in some kind of dynamic way such as rollovers or a slideshow. Then preloading makes sense because the images will be available the first time they are called by the rollover or slideshow. Without preloading for those types of images there can be a wait for the initial effect to appear.