homepage Welcome to WebmasterWorld Guest from
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member

Home / Forums Index / Code, Content, and Presentation / JavaScript and AJAX
Forum Library, Charter, Moderator: open

JavaScript and AJAX Forum

Problem with Internet Explorer Javascript
Image caching ignored

10+ Year Member

Msg#: 657 posted 1:09 am on Aug 22, 2001 (gmt 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)



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

Msg#: 657 posted 5:59 am on Aug 22, 2001 (gmt 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.


10+ Year Member

Msg#: 657 posted 1:49 pm on Aug 22, 2001 (gmt 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 :-)


Global Options:
 top home search open messages active posts  

Home / Forums Index / Code, Content, and Presentation / JavaScript and AJAX
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved