Preloading Images with MM_preloadImages

Dear all,

I seem to be having a problem with preloading images - I am setting up a photo library, with thumbnails that display the full size image when you hover over the thumbnail.  I am preloading the hover images, about 30-40k each, using MM_preloadImages.  Everything works fine, until I get more than about 20 preloaded images.  What I think is happening is that it is taking longer to preload the images than it is to load the page, and so there is a delay after the page has finished loading and before the first hover over image appears.

Is there anyway I can get round this?  I had hoped it would start displaying the images before the last few had finished loading, but it doesnt seem to work.  Im sure there is an easy solution to this, but I cant think of one at the moment - hence my post!

Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

I had hoped it would start displaying the images before the last few had finished loading, but it doesnt seem to work.

That would go against the whole idea of preloading the images in a sense...

BlueEdgerAuthor Commented:
Yes I guess it does really!

Is there anyway I could detect when the pre-load has finished and display something to show the user could continue?  I know people are going to think the site is broken if the image does not appear straight away.
Does this happen only with slow (dial-up) connections or with fast ones as well?

Determine the Perfect Price for Your IT Services

Do you wonder if your IT business is truly profitable or if you should raise your prices? Learn how to calculate your overhead burden with our free interactive tool and use it to determine the right price for your IT services. Download your free eBook now!

BlueEdgerAuthor Commented:
Its happening with fast ones as well.  So its going to be terrible on a dial up.
That is a little strange....where do you call the preloading of images, on the onLoad() of the body?

BlueEdgerAuthor Commented:

<body leftmargin="0" topmargin="0" rightmargin="0" bottommargin="0" marginwidth="0" onLoad="MM_preloadImages('image01.jpg','image02.jpg','image03.jpg','image04.jpg','image05.jpg','image06.jpg','image07.jpg','image08.jpg','image09.jpg','image10.jpg','image11.jpg','image12.jpg','image13.jpg','image14.jpg','image15.jpg','image16.jpg','image17.jpg','image18.jpg','image19.jpg','image20.jpg','image21.jpg','image22.jpg','image23.jpg','image24.jpg','image25.jpg','image26.jpg','image27.jpg','image28.jpg')">

I've only ever used preload this way.  I have seen it done via a script in the head though, although it seems very long winded.  Is there a better way to tackle this?
You might want to take a look here in case, but I guess that you are running into a wall in terms of the limits of preloading:


Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
BlueEdgerAuthor Commented:
Yes, there is a lot to preload, I guess its just one of those things.

I'll just have to educate my visitors to be a bit patient!

Thanks for your help.
Just one thing to think about:

Once the images get loaded, they stay in cache for the visit. You might consider using a frame or a pop up window that calls the preloading and have your regular window to display what you need right away. That way, you will get the best of both worlds.

It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.