Discussion Locked

Problems with php and IE cache

0 helpful
3 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

HI, i've just released a site and on the last stage of testing i foud that when using IE6 it did't reloaded rigth, even when i logged out of the site, once i folowed a link to the home it showed as if it was logged... the fix that i found was to add a dummy var on every link with a time stamp so it couldn't repet itself.
Any one have had this problem? And if, is there any other solution?

3 replies

by techexec2

This sounds like a cache problem. That is, IE is caching the PHP "file" on the client and not requesting the new page from the server.

It's easy to completely and permanently fix this in PHP. Just add a header() function call before sending any output like this (these are redundant):

header( 'Cache-control: no-cache' );
header( 'Cache-control: no-store' );
header( 'Pragma: no-cache' );
header( 'Expires: 0' );

by mario.albornoz

Yes... you'r right. Realy what was cousing the problem was this line
if(strpos($_SERVER['HTTP_USER_AGENT'], 'MSIE')) {
session_cache_limiter("private");
}
that caused IE to cache... (i need to download files from ssl). So the fix (i'm yet testing it on the ssl server) seems to be adding "session_cache_expire(-1);" after the cahce limiter
Thanks for your reply.

This discussion is closed to new replies.