Welcome Guest, Not a member yet? Register   Sign In
How can I remove all http-headers
#1

Hi all,
I just want to remove all headers that php will add
no Set-Cookie, Pragma, Cache-Control. Because this headers prevent my cache (nginx fastcgi cache) from caching. I know I can use fastcgi_ignore_headers but I think it's better php controls the cache.

Thank you
temi
Reply
#2

ok I have my solution

I just set the right headers in the controller
$this->output->set_header('Cache-Control: public');
$this->output->set_header('Pragma: cache');
$this->output->set_header('Expires: ' . gmdate( 'D, d M Y H:iConfused', time() + 120 ) . ' GMT');
and in nginx
fastcgi_ignore_headers Set-Cookie;

now php controls the cache fastcgi and browser or public caches Smile

Thank you (for CI and all the free stuff)
temi
Reply




Theme © iAndrew 2016 - Forum software by © MyBB