Preloading Images

Preloading Images

If you’re looking for a way to speed up your web site’s perceived load time, preloading your images may be your answer. By using the following JavaScript code, you can preload the images you specify prior to your web page opening. This will enable your images to promptly display instead of your visitors having to wait for them to load.

Place this code between your <HEAD> and </HEAD> tags:

<SCRIPT language=”JavaScript”>
var preload=new Image();
preload.src=”(image.gif)” mce_src=”(image.gif)”;
</SCRIPT>

Edit the text indicated in red to your image file name.

Leave a Reply

You must be logged in to post a comment.


All material @ copyrighted by chrisranjana.com. If you want to link to this article you are welcome to do so. Unauthorized publication is strictly prohibited. This developer tutorial website contains articles by Php programmers , Software developers, Mysql programmers and asp c# programmers. This website also contains ajax tutorials and advanced mysql sql stored procedures and functions tutorials and sample codes.