Webmaster

Tips
All Tips ]

Pre-load images from a page

You can pre-load the images from your page in the browser cache of your visitors. This improves browsing by displaying pages faster. To do this, add the following JavaScript between the <HEAD> and </HEAD> tags of your HTML code:

<SCRIPT LANGUAGE="JavaScript">
if (navigator.appVersion.substring(0,1) >= 3) {
i1=new Image;
i1.src='image1';
i2=new Image;
i2.src='image2';
}
</SCRIPT>

Where image1 and image2 are the names of the image files you want to pre-load. Of course, you need to add the two lines containing the name of an image for each image you have on your page.

Discover all Webmaster tips.