I've come across an issue with the caching in Internet Explorer 6, which
only occurs when the browser is set up to use a cache. I've got a page which
should never be cached, even with the use of the back and forward buttons,
so I include the following headers in the response:
Cache-Control: no-store, no-cache, must-revalidate, post-check=0,
pre-check=0, max-age=0, private, no-transform, proxy-revalidate
Pragma: no-cache
Expires: Thu, 01 Jan 1970 00:00:00 GMT
Age: 0
(Obviously, the cache-control header is all on one line. I've also tried
many other combinations of cache-control parameters; the headers above are
the most stringent ones that I've tried.)
When IE6 is not set up to use a proxy server, it correctly re-requests the
page from the server when the user presses the back button to return to it.
However, when IE6 is set up to use a proxy server, it does not re-request
the page when the user presses the back button to return to it. It uses a
locally cached copy, even though the cache-control header indicates that the
page should not be cached, as does the pragma header. It also maintains the
state of the form elements on the page.
I've confirmed (using network monitoring) that IE6 is still receiving the
headers as given above (and in further detail below), and is definitely not
re-requesting the page when using a proxy server. I also note that the proxy
server is returning a HTTP/1.0 response; IE6 still shouldn't cache the page,
because the Pragma header is there. Is this a known caching issue with IE6?
More importantly, is there a known fix or work-around?
(below I've given the complete headers returned for both the direct
connection to the server, and the response from the proxy server. The Age
header was only sent to make the direct and cached responses as similar as
possible. IE6 is configured to use HTTP/1.1 through proxies, and does
attempt to do so; the proxy only supports HTTP/1.0.)
Any help would be appreciated.
Grant Husbands.
Headers from the direct response:
HTTP/1.1 200 OK
Date: Thu, 29 Nov 2001 14:06:28 GMT
Server: Apache/1.3.9 (Unix) Debian/GNU
Age: 0
Cache-Control: no-store, no-cache, must-revalidate, post-check=0,
pre-check=0, max-age=0, private, no-transform, proxy-revalidate
Expires: Thu, 01 Jan 1970 00:00:00 GMT
Pragma: no-cache
Keep-Alive: timeout=15, max=98
Connection: Keep-Alive
Transfer-Encoding: chunked
Content-Type: text/html
Headers from the proxied response:
HTTP/1.0 200 OK
Date: Thu, 29 Nov 2001 13:58:01 GMT
Server: Apache/1.3.9 (Unix) Debian/GNU
Cache-Control: no-store, no-cache, must-revalidate, post-check=0,
pre-check=0, max-age=0, private, no-transform, proxy-revalidate
Expires: Thu, 01 Jan 1970 00:00:00 GMT
Pragma: no-cache
Content-Type: text/html
Age: 0
X-Cache: MISS from gold
X-Cache-Lookup: MISS from gold:8080
Proxy-Connection: close