Internet Explorer Caching - Solved

From: Date: Thu, 30 Aug 2007 14:11:44 +0000
Subject: Internet Explorer Caching - Solved
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-261534@lists.php.net to get a copy of this message
Charlene wrote:
I've been having problems with Internet Explorer caching php programs. I'm using the following code:
       header("Cache-Control: no-cache, must-revalidate"); // HTTP/1.1
       header("Pragma", "no-cache");
       header("Expires", "-1");
And it used to work, but now, according to Windows Explorer its giving it 3 hours to expire. Charlene I am using sessions, and it appears to work differently in PHP5 than PHP4 (not fully tested as to verification of that statement). So I needed to add a line of code before the session_start function:
session_cache_expire(0); session_start(); Charlene

« previous php.general (#261534) next »