H ave you ever opened a web page and the images take what it seems forever to load. If you have, you are not alone in this plight.
W e have tested the code in IE5.5, IE6.0, Firefox1.0, Opera7.54 and Netscape7.02. This script worked well in all platforms with no variations observed.
T o "Preload" images, you need a script to call the images and load them in the background* as the page opens.
* This is not a guarantee nor is it written in stone. This is just a script that will hopefully preload the normal size images in a normal period of time before transition occurs or the page is completed opened.
T his "Preload" script is placed in the <HEAD> section of your document.
<SCRIPT LANGUAGE="javascript">
<!-- This script and many more are available free online at -->
<!-- The java.script Source!! [ http://javascript.internet.com ] -->
image1 = new Image();
image1.src = "Path To Image To Preload";
image2 = new Image();
image2.src = "Path To Image To Preload";
// End -->
</script>
T
o add more images to be pre-loaded, just follow the format in the above script and be sure to number in sequence all the images to be preloaded. In other words, for each additional image, you need to add the below part of the script after the second image and before the below closing End tag.
// End -->
image3 = new Image();
image3.src = "Path To Image To Preload";
I n other words if we wanted to add one more image to make it three (3) to the above code which is now set for two (2) images, it would look like the below.
<SCRIPT LANGUAGE="javascript">
<!-- This script and many more are available free online at -->
<!-- The java.script Source!! [ http://javascript.internet.com ] -->
image1 = new Image();
image1.src = "Path To Image To Preload";
image2 = new Image();
image2.src = "Path To Image To Preload";
image3 = new Image();
image3.src = "Path To Image To Preload";
// End -->
</script>
O n a final note of importance. When you add the path to the images you are preloading.
You "Must" use the complete path to the image for the script to work.
T o concrete the explanation, think of you sending a letter to your friend. If you would just put his/her name on the envelope with a stamp;
- It would not get there. /myfriend.gif.
- By putting the complete address
http://www.mydomain.com/myfriend.gif- The letter can find its way to your friend.
Copyright © Consigliere Ltd., All Rights Reserved. 2001-