Hi,
I'm using js similar to the the code below to preload my images.
All of my html pages have the same header (with the js preload code) included when they load.
I was wondering if it matters that my js preload code is repeated on each and every page load. Am I slowing the page loading down? Should I only include it on the first page to be loaded?
Thank you.
I'm using js similar to the the code below to preload my images.
All of my html pages have the same header (with the js preload code) included when they load.
I was wondering if it matters that my js preload code is repeated on each and every page load. Am I slowing the page loading down? Should I only include it on the first page to be loaded?
Thank you.
Code:
<SCRIPT LANGUAGE = JAVASCRIPT>
if (document.images)
{
img1 = new Image();
img2 = new Image();
img1.src = "imageName1.gif";
img2.src = "imageName2.gif"
}
</SCRIPT>