Welcome Guest, Not a member yet? Register   Sign In
Headers set to no cache are not honored?
#1

[eluser]drewbee[/eluser]
Does anyone else have this issue? Obviously, using codeigniter, I have a very dynamic site that browsers love to cache. Naturally, setting the headers (expires, validation etc etc) is how I handle this. Can anyone verify and duplicate the following problem?

This is not being honored:

Code:
$this->output->set_header("Last-Modified: " . gmdate( "D, j M Y H:i:s" ) . " GMT"); // Date in the past
$this->output->set_header("Expires: " . gmdate( "D, j M Y H:i:s", time() ) . " GMT"); // always modified
$this->output->set_header("Cache-Control: no-store, no-cache, must-revalidate"); // HTTP/1.1
$this->output->set_header("Cache-Control: post-check=0, pre-check=0", FALSE);
$this->output->set_header("Pragma: no-cache");


This works (Same controller, just using actual headers rather then CI's output->header function:
Code:
header("Last-Modified: " . gmdate( "D, j M Y H:i:s" ) . " GMT"); // Date in the past
header("Expires: " . gmdate( "D, j M Y H:i:s", time() ) . " GMT"); // always modified
header("Cache-Control: no-store, no-cache, must-revalidate"); // HTTP/1.1
header("Cache-Control: post-check=0, pre-check=0", FALSE);
header("Pragma: no-cache");


Messages In This Thread
Headers set to no cache are not honored? - by El Forum - 02-19-2009, 12:00 PM
Headers set to no cache are not honored? - by El Forum - 02-23-2009, 02:39 PM
Headers set to no cache are not honored? - by El Forum - 03-28-2009, 05:03 PM
Headers set to no cache are not honored? - by El Forum - 03-28-2009, 05:05 PM
Headers set to no cache are not honored? - by El Forum - 03-28-2009, 06:59 PM
Headers set to no cache are not honored? - by El Forum - 03-28-2009, 07:39 PM
Headers set to no cache are not honored? - by El Forum - 03-30-2009, 11:30 PM
Headers set to no cache are not honored? - by El Forum - 04-01-2009, 10:59 AM
Headers set to no cache are not honored? - by El Forum - 04-01-2009, 11:11 AM
Headers set to no cache are not honored? - by El Forum - 04-01-2009, 11:18 AM
Headers set to no cache are not honored? - by El Forum - 04-01-2009, 11:29 AM
Headers set to no cache are not honored? - by El Forum - 04-01-2009, 11:39 AM
Headers set to no cache are not honored? - by El Forum - 04-01-2009, 11:46 AM
Headers set to no cache are not honored? - by El Forum - 04-01-2009, 11:52 AM
Headers set to no cache are not honored? - by El Forum - 04-01-2009, 11:58 AM
Headers set to no cache are not honored? - by El Forum - 04-01-2009, 12:06 PM
Headers set to no cache are not honored? - by El Forum - 04-01-2009, 12:11 PM
Headers set to no cache are not honored? - by El Forum - 04-01-2009, 12:36 PM
Headers set to no cache are not honored? - by El Forum - 04-01-2009, 12:45 PM
Headers set to no cache are not honored? - by El Forum - 04-01-2009, 01:00 PM
Headers set to no cache are not honored? - by El Forum - 04-01-2009, 01:13 PM
Headers set to no cache are not honored? - by El Forum - 04-01-2009, 01:22 PM
Headers set to no cache are not honored? - by El Forum - 04-01-2009, 01:41 PM
Headers set to no cache are not honored? - by El Forum - 04-01-2009, 01:45 PM
Headers set to no cache are not honored? - by El Forum - 04-01-2009, 01:55 PM
Headers set to no cache are not honored? - by El Forum - 04-01-2009, 01:58 PM
Headers set to no cache are not honored? - by El Forum - 04-01-2009, 02:02 PM
Headers set to no cache are not honored? - by El Forum - 04-01-2009, 02:23 PM
Headers set to no cache are not honored? - by El Forum - 04-01-2009, 02:30 PM
Headers set to no cache are not honored? - by El Forum - 04-01-2009, 02:44 PM
Headers set to no cache are not honored? - by El Forum - 04-01-2009, 03:01 PM



Theme © iAndrew 2016 - Forum software by © MyBB