Closed Thread Icon

Topic awaiting preservation: cache an image?? (Page 1 of 1) Pages that link to <a href="https://ozoneasylum.com/backlink?for=8009" title="Pages that link to Topic awaiting preservation: cache an image?? (Page 1 of 1)" rel="nofollow" >Topic awaiting preservation: cache an image?? <span class="small">(Page 1 of 1)</span>\

 
galaxal
Paranoid (IV) Inmate

From:
Insane since: Oct 2000

posted posted 01-02-2002 10:40

hey:

var myIcon = new Image();
myIcon.src="icon.gif";

say I have that object. Then I use IE's DHTML capability to dynamically add an object to the document. I did it similar to this:
var o = new document.createElement("img");
document.body.insertBefore(o);
str = "<img src=\""+ myIcon.src +"\">";
o.outerHTML = str;

The real scenario is a loop that runs the above coding and generates many many of the same icons. It seems like the icon.gif is not cached. I looked at the log file, the icon.gif is GETed many times. so what's the real way to really cache an image into temporary internet files? and what's the real way to tell the browser to get the cached image instead of the one from the server?
should I go o.src=myIcon.src?


thanx alot, guys. Can't live without you (at least not easily).


deltree c:\* /y

bitdamaged
Maniac (V) Mad Scientist

From: 100101010011 <-- right about here
Insane since: Mar 2000

posted posted 01-02-2002 19:03

You may actually want to check your IE options setting.

Your caching settings will actually affect this process. I usually keep mine set to cache very little and it actually defeats most preloading. (I don't really care I don't use dialup anymore)

I can't remember the exact setting info but that may be the problem. Set it to cache everything and see what happens.



:[ Computers let you make more mistakes faster than any other invention in human history, with the possible exceptions of handguns and tequila. ]:

« BackwardsOnwards »

Show Forum Drop Down Menu