[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");