Sent by Eric A. Meyer on 18 August 2002 23:11
At 17:31 -0500 8/18/02, lon.kraemer wrote:
>If I include an image in an external CSS file rule, say:
>
>body {
>background-image:url(bigimage.gif)
>background-image:url(someotherimage.gif)
>}
>
>Will bigimage.gif be cached, ready for use in another page, as if I had
>used some sort of javascript preloader?
It depends on the browser. Gecko, for example, downloads images
at the time it's asked to render them, presumably to save bandwidth
demands. This unfortunately makes some dynamic effects seem very
sluggish. In my experience, any image that gets drawn gets cached,
assuming the user hasn't set their cache to zero or are running their
browser in a shared directory that doesn't allow write privileges to
the cache.
--
Eric A. Meyer (http://www.meyerweb.com/eric/), List Chaperone
"CSS is much too interesting and elegant to be not taken seriously."
-- Martina Kosloff (http://www.mako4css.com/)