[eluser]alphabase[/eluser]
Hi,
I need to set my content-type through the output class, since my HTTP server does not do this automatically and GTmetrix requires this for speed optimalisation.
So I've added this just before loading my views:
Code:
$this->output->set_header('Content-Type: text/html; charset=UTF-8');
That seems reasonable, and actually also works fluently.
Now I also wish to use the output caching, so I've added also before loading my views:
Code:
$this->output->cache(3600);
But this seems to override my HTTP-header overrides, giving me the response header:
Quote:Content-Type:text/html
Instead of:
Quote:Content-Type:text/html; charset=UTF-8
I've also tried adding the set_header to my controller's construct function, but this does not work.
Any idea how to fix this?