magister wrote:
Can anyone tell me with certainty?
If I load a server-side image into a javascript image object.
Is the image saved on the client, or does the page go back to
the server when I do for instance an image swap?
Browsers usually have a cache where resources are downloaded to and
stored for faster access. Of course images can be cached too and image
preloading with
var img = new Image();
img.src = 'whatever.gif';
indeed intends to cache the images.
What a browser then exactly does when an image is accessed depends on
various things, there are browser preferences for instance that set
whether a resource can be loaded from the cache unchecked or whether the
browser first needs to contact the server to find out whether the
resource has been changed. And of course caches have a certain size so
if you want to preload a lot of images not all might be cached.
--
Martin Honnen
http://JavaScript.FAQTs.com/