I don't think there is a server based way to force images into the cache; anything originating from the server (push) would force the browser to pop a window asking if the user really wants it.
You should have no problems doing it with Javascript, however. Just write a function that you execute on the "onLoad" event in the <BODY> tag. This function should create a new Image() object for each image you want to pre-load, setting the SRC attribute of the image to your image file:
function preloadImages() {
if (document.images) {
imageOne = newImage("imageOne.jpg");
imageTwo = newImage("imageTwo.jpg");
imageThree = newImage("imageThree.jpg");
preloadFlag = true;
}
}
This will cause the browser to load the images in the background after the main body of the page is already loaded and the user is reading it. When the images are needed later and referenced with the <IMG> tag, they will already be in the cache.
One caveat; put the code to preload the images on all the pages in case a user reads fast and jumps to another page before pre-loading completes.
Hope this helps.
-- Rich Rijnders
-- Irvine, CA