Why does internet explorer lose image cache when a popup is opened?

P

peter

Scenario:
An internet explorer window contains the following code:
<script...>
window.open(...);
</script>
Note "..." denote additional code not relevant to this question.


In addition to the above code, the html page contains images.

Execution of the code opens a "popup" window. When the popup opens,
the browser's cache of the images in the "parent" or "opener" is lost.

The behavior is exhibited when you close the popup window and perform
an action on the opener that would normally cause an image to be
displayed - for example browsing away from the page and then
returning. Images that were previously in the browser's cache are now
requested again from the server.

To explain in a different way. You browse to the page - the images are
loaded into the browsers cache. When you browse away from the page and
then back again, the images are drawn from the browser cache - not
requested from the server. Opening a popup clears the images from the
cache. So, browsing away from the page and back again causes the
images to be reloaded from the server.

The only remedy that I am aware of is changing a setting in the
browser:
Tools->Internet Options->Settings
and changing the "check for newer versions" setting to "Never". This
is unsatisfactory as I cannot ask visitors to my website to do this.

I require a method to prevent this behavior in internet explorer -
however it must be a method that does not require the user to change
settings on their computer or browser.
 
P

peter

Example:

<head>
<script language="javascript">
function popup(){
window.open("foo.php")
}
</script>
</head>
<body>
<img src="something.gif" />
<a onclick="popup()">Click for popup</a>
</body>

When you first browse to the page, something.gif loads and is stored in
the browser cache. If you browse away and back again, the image is
retrieved from the cache (this is desirable behavior).

If you browse to the page and then click the link to activate the
popup, then close the popup, then browse away and back again, the image
(something.gif) is not retrieved from cache - it is requested from the
server again (this is undesirable).
 
R

Robert Aldwinckle

Scenario:
An internet explorer window contains the following code:
<script...>
window.open(...);
</script>
Note "..." denote additional code not relevant to this question.


In addition to the above code, the html page contains images.


Sorry. I meant "Post a working example". <w>

E.g. that would be a way to determine if your server was doing
something which was causing the symptom (such as sending
a Vary: header which is known to cause IE to mark otherwise
cacheable objects uncacheable.)


HTH

Robert
---
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top