CodeIgniter Forums

Full Version: set_header not working
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi All,

CodeIgniter 3.

In all of my pages (responses), the expires header is set to Thu, 19 Nov 1981 08:52:00 GMT, so I added this to my controller:

Code:
$this->output->set_header("Expires: " . gmdate( "D, j M Y H:i:s", time() ) . " GMT");

But I keep getting the same value. Nothing changes.

What am I doing wrong?

Thank you.
perhaps this gets undone later in your code.

if i was you i would try to identify where the weird expiration date is set to year 1981 as you mention.
(03-14-2017, 11:09 AM)iz_no_good Wrote: [ -> ]perhaps this gets undone later in your code.

if i was you i would try to identify where the weird expiration date is set to year 1981 as you mention.

Thank you for your answer, but I did a file search and there is no other place where this is set.
Is this hosted on Godaddy? I once had an issue where they were stripping headers from my code, and even after proving to them that their server was doing it, they wouldn't do anything about it.

I always set headers with the PHP header function.