Preloading images...
Posted: Thu Jan 16, 2003 1:15 am
How do I preload images that when the site loads, it won't have need to fetch the images from the server?
I made a script and it works this way:
Index.htm has 3 frames. It also has script to preload images.
image1 = new Image();
image1.src="images/image1.jpg";
In one of the frames, say middleframe, uses this image.
<img name=img1>
<script>img1.src=image1.src</script>
Everytime middleframe is changed, the image is downloaded again from the server.
Here's my link, http://members.lycos.co.uk/charbelgame
I've got an idea on how to get the map to stay loaded, always but not with the other pics.
thanks
I made a script and it works this way:
Index.htm has 3 frames. It also has script to preload images.
image1 = new Image();
image1.src="images/image1.jpg";
In one of the frames, say middleframe, uses this image.
<img name=img1>
<script>img1.src=image1.src</script>
Everytime middleframe is changed, the image is downloaded again from the server.
Here's my link, http://members.lycos.co.uk/charbelgame
I've got an idea on how to get the map to stay loaded, always but not with the other pics.
thanks