Search code examples
phpproxyinternet-explorer-7cache-control

Web Page ALWAYS Expired, IE7, (?)Proxy Cache


I'm working in PHP 5.3, on Apache.

A couple of (important) people have reported that the "details" page of the site does not load for them in IE7, instead ALWAYS delivering a "Webpage has expired" message. This error is only reported from these people, and I cannot reproduce the problem, using IE8 in IE7 mode (not just browser compatibility mode, but actually opening the dev tools and setting it to IE7 browser mode).

I've tried setting:

Header("Cache-Control: public, max-age=". 60 * 60 * 24 * 7);
Header('Expires: '.gmdate('D, d M Y H:i:s \G\M\T', (time() + (60 * 60 * 24 * 7)) ));

And can verify that these commands are working by reading the headers on the page from a Chrome extension.

I also thought it might be the minifier that I was using that was causing problems, as it has some logic to deal with caching, but complete removal of the minifier has not changed the problem.

The only thing I haven't tried yet is removing the POST form and changing it to GET (which I need to do anyways as it's no longer necessary). However, even clicking directly on the link to the page causes them to receive an error that says "operation aborted and that IE can not open the webpage," which is baffling to me, because this was never a problem before, and I don't see how a page error is also causing the expired error.

There is a chance that the users experiencing the error are behind a Proxy Cache.

I'm at a total loss here, just shooting the dark now.


Solution

  • The problem was actually caused by the asynchronous javascript loader I was using. Removing it removed the errors and page expired warning.