CodeIgniter Forums
Client has aggressive page caching on his network ... causing PAIN! Any ideas? - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23)
+--- Thread: Client has aggressive page caching on his network ... causing PAIN! Any ideas? (/showthread.php?tid=19538)



Client has aggressive page caching on his network ... causing PAIN! Any ideas? - El Forum - 06-10-2009

[eluser]skattabrain[/eluser]
I have a project I'm working on and the client's network is caching everything. It's not browser related ... seems the servers in their internal windows domain are doing the caching. I don't understand how they can do this and not screw up users internet activities.

How can I deal with this? It's possible the client might not have the authority to get the admins to change this.

I'm so frustrated by this ... I'm literally considering adding time stamps to the end of all URL's for internal/admin pages .... but that's so lame and will cause such a mess.

I've added this to all pages ... not phasing it! (btw - I've added this to a common view rather than in each controller, I assume that's ok ... Firebug sees the headers)

Code:
$this->output->set_header("Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0");
$this->output->set_header("Pragma: no-cache");



Client has aggressive page caching on his network ... causing PAIN! Any ideas? - El Forum - 06-10-2009

[eluser]drewbee[/eluser]
Try using all the headers. I had this issue from the proxy at one of my last jobs I worked at. It only cached css and js files though.

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



Client has aggressive page caching on his network ... causing PAIN! Any ideas? - El Forum - 06-10-2009

[eluser]skattabrain[/eluser]
[quote author="drewbee" date="1244681713"]Try using all the headers. I had this issue from the proxy at one of my last jobs I worked at. It only cached css and js files though.[/quote]

Thanks drewbee ... I'll let you know how this works out.