RE: stand-alone image preload?

by Nancy Hastings-Trew <nancy(at)hypertextdigital.com>

 Date:  Fri, 28 Apr 2000 08:31:17 -0400
 To:  hwg-languages(at)hwg.org
  todo: View Thread, Original
First, when I use a preload routine I never bother to put it into a
function and I don't call it from an onload routine as Phil Babcock does.
Just put the commands into a header script with no function wrapped around
it and it will execute as it is loaded. It works fine in my experience. On
an body onLoad call the images aren't actually being loaded until the
entire rest of the page is loaded, which means it's not "pre-loading" at all.

While the original question was not about preloads for rollovers, I have
noticed however with rollovers in IE4 on my machine at least that unless I
preload not only the alternate image but the first visible image as well
the onMouseOut event "sticks".. the first image does not return right away
but appears to be being loaded from the server. If I preload both images it
works fine. I'm not sure why this should be... the first image is loaded as
part of the page and supposedly is already in the cache. Which makes me
wonder about Peter's caching theory, below. 




>From: Peter Benoit <pbenoit(at)triton-network.com>
>
>Well...
>
>When you preload an image with the Javascript method, I suppose the question
>should be asked if it's loaded strictly into memory or to the cache itself,
>or both?  If it's loaded into memory, then will the browser recognize the
>image name or only the name of the constructor.  I'm willing to bet on the
>latter.
>
>Now, if it's loaded into the cache (I doubt it, but it could be I suppose)
>then will the browser be smart enough to recognize the image from the cache
>(which was just created)?  In IE I would really doubt it, yet it might be
>more likely in Netscape.  You'll probably have to tinker around with it, but
>I have doubts.
>
>My 2 coppers.
>

cheers,

Nancy


********************************

hypertext digital publishing
Graphic Design & Website Development 
http://www.hypertextdigital.com
nancy(at)hypertextdigital.com
********************************

HWG: hwg-languages mailing list archives, maintained by Webmasters @ IWA