0

I am trying to add a cookie, which works fine in firefox and chrome, but is not working in IE.

Here's the code:

ob_start( 'ob_gzhandler' );
header('P3P:CP="IDC DSP COR ADM DEVi TAIi PSA PSD IVAi IVDi CONi HIS OUR IND CNT"');

$expires = time()+60*60*24*30;
setcookie( 'aff_source', $value, $expires, '/', '.subdomain.domain.in', false, true );

I am not sure why it's not setting the cookie in IE. Would appreciate any pointers.

IE version: 8
Checked with  - IE developer toolbar

I have looked at the answers in SO for similar problems, but am not able to solve it.

Thanks.

web-nomad
  • 6,003
  • 3
  • 34
  • 49
  • What IE version, how did you determine it doesn't work in IE, what debugging tools have you used with IE? Also, it doesn't look like it's a programming problem. If it works in 2 browsers and not in IE, it's something due to IE config or proxies between the php and IE. Programming-wise, your code is working (as witnessed by 2 working cookies). – N.B. Jun 10 '13 at 09:59
  • @N.B. - Please see my edited question. When i do a `document.cookie`, i don't see the cookie. – web-nomad Jun 10 '13 at 10:02
  • 1
    Take look at this [question](http://stackoverflow.com/q/16808758) and the accepted answer. – HamZa Jun 10 '13 at 10:07

0 Answers0