• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
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, 12:09 PM)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


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


Users browsing this thread:
1 Guest(s)


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