• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How can I remove all http-headers

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

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)

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  

  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2020 MyBB Group.