Wrox Home  
Search P2P Archive for: Go

  Return to Index  

javascript thread: Image Cache


Message #1 by "T FX" <teknofx@h...> on Mon, 21 Jan 2002 22:22:05 -0500
Has anyone had trouble with caching images in javascript?  For example:
<script>
   foo = new Image();
   foo.src = foo.gif;

   function replaceOtherImageWithFoo(){
      document.thatImage.src = foo.src;
   }
</script>
blah blah href="#" onmouseOver(replaceOtherImageWithFoo()) blah blah 
name="thatImage" blah blah blah

The problem is that foo is constantly being called again from the server on 
mouse over, and doesn't cache on the client.  Any ideas?

TIA,
-t3kn0

_________________________________________________________________
MSN Photos is the easiest way to share and print your photos: 
http://photos.msn.com/support/worldwide.aspx


  Return to Index