I\'m trying to figure out a way to cache the next and previous images in my gallery script ... I\'m wondering if this is a good way to do it. Also, is there any way to manually
display: none images will be downloaded and cached on the client. However, JavaScript already has a well-defined way of preloading images:
display: none
var nextImage = new Image(); nextImage.src = "your-url/newImage.gif";
This will preload an image without displaying it to the user.