View Full Version : Preloading image question

09-25-2007, 01:12 PM
Hi! :o

I have a popup that opens automatically when my home page opens, and currently you have to wait for the home page to load first before any images load in the popup window.

If I want to preload an image in the popup so you see it right away on site load, do I put the preload script on the homepage, or the page I created for the popup window?

Thanks in advance!

09-25-2007, 08:57 PM
Preloading takes as long as loading, longer if the image is called for before the preloading is complete, because then the loading process starts over. To have any appreciable effect on a true pop up, the image would need to be preloaded on some other page, long before one gets to the page that pops up the pop up.

Also, having:

. . . a popup that opens automatically when my home page opens

is virtually impossible in browsers with pop up blocking turned on, which almost do, these days. Perhaps you mean a DHTML pop up division, and not a pop up window. That could work, but if it is your home page, the first page people see on your site, preloading will not help. You could (if it isn't a pop up window) arrange things so that its image is one of the or the first to load on the page though. This can be done by having its HTML code be the first thing in the body of the page.

09-26-2007, 12:27 AM
Thank you! ;)