General discussion

Locked

Problems with php and IE cache

By mario.albornoz ·
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?

This conversation is currently closed to new comments.

3 total posts (Page 1 of 1)  
| Thread display: Collapse - | Expand +

All Comments

Collapse -

Sounds like a cache expire date problem

by TechExec2 In reply to Problems with php and IE ...

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' );

Collapse -

Kind of

by mario.albornoz In reply to Sounds like a cache expir ...

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.

Collapse -

You're welcome...

by TechExec2 In reply to Kind of
Back to Web Development Forum
3 total posts (Page 1 of 1)  

Related Discussions

Related Forums