Welcome to WebmasterWorld Guest from

Forum Moderators: open

Message Too Old, No Replies

Problem with Internet Explorer Javascript

Image caching ignored

1:09 am on Aug 22, 2001 (gmt 0)

New User

10+ Year Member

joined:Nov 1, 2002
votes: 0


I have discovered a very irritating problem when using Javascript with Internet Explorer 5 and would appreciate some help and advice if possible.

I have a window subdivided into 4 frames, 2 of which contain Javascript files embedded via the
<SCRIPT SRC="filename.js"></SCRIPT> method.

One Javascript-using frame contains a little real time clock, I preload the images for caching by the browser before using them, and the clock works fine.

The other Javascript-using frame is an index frame, with images corresponding to contents titles "highlighting" via a simple image substitution triggered by OnMouseOver/OnMouseOut
events. Again the images I use are pre-cached before use, and everything is fine ... until ...

... I cause another window to launch when clicking on a link.

It doesn't matter whether or not the window is launched using the standard HTML "TARGET" attribute in the non-Javascript-using, and separate, main frame, or whether I launch an auxiliary window from the index frame whose attributes I specify using Javascript
... in both cases I Explorer decides in its "wisdom" to totally ignore the fact that it has the images I mentioned above already cached,
and requests them all again from the server.
Naturally, ( as you can imagine ) because the clock function I have written is now up and running and rescheduling itself, this
messes up the works good style and everything grinds to a halt :-(.

Please note that the problem descibed above does not occur at all when using Netscape Navigator, my preferred browser anyway.
In this case no requests are made to the server, and I have proved this by monitoring TCP/IP activity.

Any help anyone can offer would be appreciated.

Many thanks in advance


Both script-using frames use locally scoped variables with no overlap or name duplication at any level in the scoping chain, so IE has no "excuse" to go and re-check them out by requesting frame image updates from the server.

All of my script files are standard Javascript 1.1 and I make a policy of not using vendor specific features for as near universal compatibility as is possible

(edited by: tedster at 3:42 am (gmt) on Aug. 22, 2001

5:59 am on Aug 22, 2001 (gmt 0)

Senior Member

WebmasterWorld Senior Member tedster is a WebmasterWorld Top Contributor of All Time 10+ Year Member

joined:May 26, 2000
votes: 0

I found a mention of a similar problem (unneeded caching when using frames), that Microsoft acknowledges on their site. It only occurs with ASP pages, but it might relate to your challenge. Here's the link:


Unfortunatley, the fix in any case is likely to be a browser patch, not something you can do in you web page code.

1:49 pm on Aug 22, 2001 (gmt 0)

New User

10+ Year Member

joined:Nov 1, 2002
votes: 0

Thanks Tedster,

The "workaround" I use at the
moment is to detect IE and just
let the clock run ONCE.
It stops the site freezing by
requesting digit-images when
the clock re-schedules.

I'll have a look at it :-)