View Full Version : preloading images does NOT work??

01-08-2010, 08:38 AM
never mind, answer given

01-08-2010, 08:51 AM
preloading images only really helps for a site that uses rollover images or has images that show later after a script triggers them. when you initially load the page, the images are still downloading and doing a preload has no effect.
Also, you're missing a img6 = new Image(); to match with the last image in your script.

01-08-2010, 09:03 AM
ok fixed the img 6, but you're saying there's no way to get the page to load ALL it's images before displaying?

I see websites that have a good amount of images but don't take time to show...

01-08-2010, 09:32 AM
That has more to do with the byte size of the images, and of course the bandwidth, but since the bandwidth should be about the same for you personally regardless of the site you are viewing, it would be the byte size of the images.

For instance, you have:

/images/banner.png @ 203 KB (207,263 bytes)

This image could be saved as a JPEG (.jpg) and then be optimized to say about 70% quality. It would still look really good and come in at about 19,000 bytes or 9.2% of the original. I know you have that one transparent corner, but that could be managed by matching it up with its background in various ways.

Anyways, preloading will only help as CCH has indicated, although you could preload with a progress bar and hold back page display until key images are available. With an image that size though, it would take some time on a slower connection. Many people won't wait.

On a more positive note, with a fast connection, the page doesn't take all that long to load anyway.

01-08-2010, 09:52 AM
thanks for the help!

I appreciate it.

01-08-2010, 10:18 AM
Here's one possibility:


01-08-2010, 12:27 PM
yeah I understand what you were talking about, I had an image like that earlier on. It's not a big deal since it will be replaced by a flash image soon, just wanted to find out if I could make it appear with the page all at once.

wouldn't it be nice if we could all use 1 browser with one image type to do everything?