Wrox Home  
Search P2P Archive for: Go

  Return to Index  

javascript thread: Re: cacheing images


Message #1 by "Yakoob Ali" <yax@a...> on Tue, 21 Aug 2001 09:58:20
Hi,

I am having similar problems. 
I was wondering if you have come across a solution
to this problem (without modifying the browser setings)?

Thanks

Yakoob

> For IE you might want to check your browser settings.
> 
> (For IE 5) Options -> General -> Settings -> Check for newer versions of
> stored pages:
> 
> From what I can tell, the setting "Every visit to the page" checks the
> modification date of each image file with the server each time it is 
used.
> For this reason, the javascript image caching code mentioned does not 
help a
> whole lot. The image is stored in the cache, but when used the browser 
still
> goes to the server to ensure that a newer version of the image is not
> available.
> 
> Not 100% sure on this one, but the theory seems to work with my browsers
> behaviour. :)
> 
> Anil
> 
> 
> ----- Original Message -----
> From: "Lyn Roger Rider" <lynrider@p...>
> To: "javascript" <javascript@p...>
> Sent: Tuesday, April 10, 2001 7:28 PM
> Subject: [javascript] Re: cacheing images
> 
> 
> > > Hello javascripters.
> > >
> > > I have some image rollovers on my site.  I'm currently unable to 
figure
> > > out why loading images into the cache is not working for me.
> > >
> > > <script language="JavaScript1.2">
> > >
> > > var company_roll = new Image();
> > > company_roll.src = "(url to image)";
> > > </script>
> > >
> > > when I rollover the picture after the initial page load has 
completed...
> > > the picture has not been loaded into the browser's cache.. and still
> > > must be loaded from the server.. any pointers would be greatly
> > > appreciated.
> > >
> > Hi, I seem to have a similar problem, in that I am sure the images are 
in
> > the cache, but for some reason the browser (Exp5) keeps looking back to
> > the server every few seconds, and therefore they slow right down. In my
> > case, I notice that if I link to another of my pages and then use the 
back
> > button then everything is fine and all the images are accessed from the
> > cache. I am trying to use this fact to work around this with javascript
> > but am only a beginner. I would be interested to know if your rollovers
> > behave in a similar way. ( ps; In Netscape this does not seem to be a
> > problem)
>

  Return to Index