HOW TO ENABLE PRELOAD IMAGES FOR WEB PAGE?
Keep this Preload Images javascript just above the tag on your web page. Change values to your image files and set the directory path to the path for your image files on the server. This will help you to load your images faster on the web pages and will enhance the browsing experiences, making them faster.
PRELOAD SCRIPT:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 | <!-- Beginning of Script --> <!-- Use this preload script to preload your images on the web pages for faster web page browsing --> <!-- Change the values to your images path on the server. Keep this code just above the </body> tag on the web page i.e just at the bottom of the web page --> <SCRIPT LANGUAGE="JavaScript"> <!-- Hide from crappy browsers preload1 = new Image(); preload1.src = "img1.jpg"; preload2 = new Image(); preload2.src = "img2.jpg"; preload3 = new Image(); preload3.src = "img3.jpg"; preload4 = new Image(); preload4.src = "img4.jpg"; preload5 = new Image(); preload5.src = "img5.jpg"; // --> </SCRIPT> <!-- You may change the image names according to your names and also add more preloads if you have more images to preload --> <!-- End of script--> |
NOTE:
Keep this preload javascript just above the