Welcome Guest, Not a member yet? Register   Sign In
set_header not working
#1

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.
Reply
#2

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.
Reply
#3

(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.
Reply
#4

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.
Reply




Theme © iAndrew 2016 - Forum software by © MyBB