On this page:
http://www.serenitynowyoga.net/jordanteachers.htm
The images are all about 30k. They don't need to be. For example, here is Viki's image (one of the largest at about 31k) at about 9k:

That's with no perceptible loss in quality. With a slight loss or in full gray scale, it could be 7k or less. If all of the images were compressed using an image optimization program, you would cut at least about 2/3rds off of the load time.
On this page:
http://www.serenitynowyoga.net/jordangallery.htm
If you were to compress the images and also use thumbnail images instead of the full sized images for the little versions, you would save a lot on load time there as well.
You could preload images on other pages as you suggest but, it would be best to take care of these other things first. To preload on another page, just add a preload routine to a page's onload event. Here is a good preload routine that will add itself to a page's onload event:
Code:
<script type="text/javascript">
function preload_images(){
//Enter your images (and paths, if any) in the preloads array:
var preloads=['image_1.jpg', 'image_2.jpg', 'image_3.jpg', 'image_4.jpg'];
/////////// Stop Editing ////////////
var loadem=function(im){
var pimg=new Image();
pimg.src=im;
}
for (var i_tem = 0; i_tem < preloads.length; i_tem++)
loadem(preloads[i_tem]);
}
if ( typeof window.addEventListener != "undefined" )
window.addEventListener( "load", preload_images, false );
else if ( typeof window.attachEvent != "undefined" )
window.attachEvent( "onload", preload_images );
else {
if ( window.onload != null ) {
var oldOnload = window.onload;
window.onload = function ( e ) {
oldOnload( e );
preload_images();
};
}
else
window.onload = preload_images;
}
</script>
Just list the images as shown (red) in the array. Put it in the head of any page that will be visited before the page that uses the images, preferably a page that visitors are likely to linger on and that has little or no other scripts on it.
Bookmarks