Internet Explorer 11 won't set cookies on a site

prototype picture prototype · Mar 27, 2014 · Viewed 32.1k times · Source

For some reason IE11 (only IE11, tested with other IE9 and IE10) won't create a session on a site i've been working on. So this means that a basic functionality such as site login won't work.

On other browsers this is working perfectly.

I researched a bit and found out that IE won't work with domains with underscore.. but my domain doesn't have one so what could be the problem? Thanks!

Answer

bebbo picture bebbo · Jan 13, 2016

IE 11 does not like a domain value in the cookie. Leave it empty.

Wrong for IE 11:

Set-Cookie: kohanasession=foobar; expires=Tue, 09-Apr-2016 01:01:01 GMT; path=/; domain=tc.mk; httponly

Correct for IE 11:

Set-Cookie: kohanasession=foobar; expires=Tue, 09-Apr-2016 01:01:01 GMT; path=/; httponly