From 2c5bf2e515a079d395dbaeaa64c5e3b9dedc0880 Mon Sep 17 00:00:00 2001 From: jamieburchell Date: Wed, 16 Jan 2013 17:25:44 +0000 Subject: [PATCH] Update libraries/Template.php Setting the "Cache-control" header twice overwrites the first because CI's default "$replace" parameter in CI_Output::set_header is TRUE. The side effect of this is pages are not revalidated when navigating browser history. --- libraries/Template.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libraries/Template.php b/libraries/Template.php index ca28ff1..44e50ae 100644 --- a/libraries/Template.php +++ b/libraries/Template.php @@ -239,7 +239,7 @@ public function build($view, $data = array(), $return = FALSE) // Disable sodding IE7's constant cacheing!! $this->_ci->output->set_header('Expires: Sat, 01 Jan 2000 00:00:01 GMT'); $this->_ci->output->set_header('Cache-Control: no-store, no-cache, must-revalidate'); - $this->_ci->output->set_header('Cache-Control: post-check=0, pre-check=0, max-age=0'); + $this->_ci->output->set_header('Cache-Control: post-check=0, pre-check=0, max-age=0', FALSE); $this->_ci->output->set_header('Last-Modified: ' . gmdate( 'D, d M Y H:i:s' ) . ' GMT' ); $this->_ci->output->set_header('Pragma: no-cache'); @@ -793,4 +793,4 @@ private function _ext($file) } } -// END Template class \ No newline at end of file +// END Template class