faqts : Computers : Programming : Languages : PHP : Common Problems : Caching

+ Search
Add Entry AlertManage Folder Edit Entry Add page to http://del.icio.us/
Did You Find This Entry Useful?

68 of 112 people (61%) answered Yes
Recently 2 of 10 people (20%) answered Yes

Entry

Why doesn't the PHP sample script for no-cache disable caching in IE-6?

Feb 8th, 2002 09:20
Ron Holland,


The read order (top > down) may make a difference. Re-arrange the 
headers as they appear in the example below. This effectively disabled 
page caching in IE-6 running in OS-Windows ME.

EXAMPLE:

header("Cache-Control: post-check=0, pre-check=0", false);
header("Pragma: no-cache"); 
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
/* Date in the past*/

header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT"); 
/* always modified*/

header("Cache-Control: no-cache, no-store, must-revalidate");
/* HTTP/1.1 */read