Preload Images (Java Script)



  • Purpose: To preload images into the Web Viewer's Cache File. This will greatly reduce the time they spend downloading images while browsing your website.


  • Instructions: Copy and Paste the Script onto your Web Page. Place the Java Script portion inside the <HEAD>,</HEAD> Tags.


<script language="JavaScript">
<!--
arImageSrc = new Array (
"image1.gif",
"image2.gif",
"image3.gif",
"image4.gif"
)

arImageList = new Array ();

for (counter in arImageSrc) {
arImageList[counter] = new Image();
arImageList[counter].src =
arImageSrc[counter];
}
// -->
</script>
  • Replace image.gif with the pathfile and filename of the graphics you wish to preload.





| HTML Help Homepage | Help Topics |