I'm not a rails programmer, but my understanding is that Rails uses Prototype by default. Assuming that, you could include this JavaScript:
Prototype.preloadImages = function(){
for(var i=0, images=[]; src=arguments[i]; i++){
images.push(new Image());
images.last().src = src;
}
};
Then add this code wherever your onload code runs. Maybe something like this:
Event.observe(window, 'load', function(){
Prototype.preloadImages('header/home_over.gif','another/image/to/preload.gif');
});
You'll have to assure that whatever magic image_tag()
does is done to the image paths to assure that the correct image is preloaded.