Web Development

General discussion


Can you control when to precache images?

By iclang ·
I have a page that requires precaching of images and I want to be able to precache one at a time... after each one is done, it goes to the next and begins precaching, and so on...

Has anyone successfully done this or have any ideas? I've tried: (not actual code but close!)

var theImages = new Array()
theImages = new Image();
theImages.src = "photo"+x+".jpg"
theImages.onload = [do it again with next image]

But with no luck.


This conversation is currently closed to new comments.

Thread display: Collapse - | Expand +

All Comments

Related Discussions

Related Forums