[thelist] preloader question

jeff jeff at members.evolt.org
Mon Mar 5 12:03:14 CST 2001


: From: Peter-Paul Koch
: > I now find that whenever I mouse over
: > said images a call is made to the server,
: > which didn't happen before.
: >
: > I thought that preloading, however it was
: > done, should stop this.  Is there anything
: > wrong with the function code below that
: > would cause this?  Or am I wrong in my
: > assumption about preloading?
: No, the assumption is correct, it's just that
: both Explorer 5 and Netscape 6 have trouble
: with preloading.  A script like you wrote should
: work fine in the Version 4 browsers, but IE5 and
: NN6 are sometimes slow in showing images (though
: never in the same way, of course) and may request
: them from the server regardless (I think it's
: mainly IE5 who does this).

i've not found preloading to be problematic in nn6 at all.  i've only found
it to be problematic in ie5 in one instance.  this is where you have your
cache settings to check every visit to the page, rather than "automatic"
which is the default.

fwiw, some time ago i wrote a preloading function almost identical to the
one (some of the variable identifiers are even the same case) in question
and it's worked flawlessly in every browser that supports the image object.
just so everyone knows, the browser doesn't care how you preload the images,
so long as you make reference to the object that contains the preloaded
image when performing the image swap.  if you preload but just swap the
image path directly there is no guarantee it will be instantaneous.

i just double-checked an example page using this technique (making sure that
ie's cache settings are "automatic" and not "every visit") and it works


good luck,


mailto:jeff at members.evolt.org

More information about the thelist mailing list