I have an application that has been in production on ie6 for a while.
It seems to run fine on ie7 except when it is used with https.
The problem (after days of debugging) appears to be that occasionally,
showModalDialog decides to cache the result of the previous
showModalDialog instead of sending the request to the server. The
application builds the pages dynamically, and all requests must be seen
by the server in order to work correctly.
The responses always have the "Cache-Control: no-cache" header, so I'm
very suprised to see this happening.
So...why is this happening? Is there something different about
cache-control with https?
Do I have to recode my application to ensure that all URLs are unique?
I'd rather not.
Help please.
> So...why is this happening? Is there something different about
> cache-control with https?
So I've fixed the problem by adding more headers:
Cache-Control:
no-store,no-cache,must-revalidate,post-check=0,pre-check=0
Expires: 0
Pragma: no-cache
I came across this list of headers when attempting to reproduce these
problems using a simple php script on the server side. php seems to add
all of these protective headers automatically.
So, shouldn't a simple "Cache-Control: no-cache" have done the trick?
Is this a bug in IE? or am I just not understanding the subtle meaning
of these headers?
BTW, I found the HTTP Analyzer by IE Inspector extremely helpful. Not
only can I see the HTTPS requests and responses unencrypted, but it
shows the requests that are never made when the browser decides to use
its cache. It also shows the state of the cache before and after each
request. This not only immediately confirmed my suspicions about IE's
behavior, but also helped to easily confirm that the fix was working
solidly.