[thelist] browser requests

Rick den Haan rick.denhaan at gmail.com
Sat Jan 28 11:22:37 CST 2006


On 1/28/06, Robert <vreeland at studioframework.com> wrote:
>
> My question is : Do browsers usually request files where the url is
> located
> in a javascript function that is never used; like in an image preloaded
> for
> mouseovers that is never called. It is my understanding that if the
> function
> is not called the browser will not try to download the image.


Robert,

AFAIK, the whole point of preloading an image is so that it will be in the
browser cache when it is called. If the script starts preloading when te
mousover function is called, that would kind of defeat the purpose, wouldn't
it? If I've read your message correctly, here's a breakdown of your current
application:

onload -> preload image linkHover.jpg
function doSomething -> replace linkDefault.jpg with linkHover.jpg
onmouseover -> doSomethingElse

Correct? Which means that even though the function doSomething is never
called, the image linkHover.jpg is still preloaded.

HTH,
Rick.



More information about the thelist mailing list