ie doesn’t see cookie, but firefox and opera does

Sep 23rd, 2010 | Posted by

Problem.

Very strange problem. We’ve got site di.by. This site set cookie PHPSESSID. Header looks like:

Set-Cookie: PHPSESSID=1f7d0b338f2b5a4e53c66cf213fe5f90; path=/; domain=di.by

Opera and Firefox set this cookie without any problems, but internet explorer doesn’t see it at all. It doesn’t block it. We’ve checked it many times.

We make alias for domain di.by – http://confa.of.by/ and cookie

Set-Cookie: PHPSESSID=498b3195efe311c30b61d59eec3f4b23; path=/; domain=confa.of.by

works without any problems in IE.

We check from ie6 till ie9. And problems was in all versions.

Solution.

It is very strange too. I surfing through Internet and couldn’t find anything. But programmers solve this very rough and effective. They changed cookie to this:

Set-Cookie: PHPSESSID=1ff0ebc3b0a88de2dac01d0c3e6ed496; path=/

And IE set it without any problem. Very strange, maybe some bug in IE with short domains. But exactly explanation I don’t have. Maybe someone know?

Tags: ,
  1. Yury
    Sep 23rd, 2010 at 17:15
    Reply | Quote | #1

    IE just does not like 2 char domain names:)

  2. Lanselot
    Sep 23rd, 2010 at 21:10
    Reply | Quote | #2

    Microsoft it always differs from the other