Internet Explorer 11 won't set cookies on a site

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!


Solution 1:

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

Solution 2:

I know this is old, but hopefully this helps someone in the future. You cannot have a blank expires=; value in a cookie in IE11. You just have to leave the expires field out altogether.

Solution 3:

This may only apply to another-domain cookies, but if someone finds this via Google (like I did) this may help.

IE11 may not set cookies depending on its Privacy settings.

This worked for me:

enter image description here

(Internet Options -> Privacy -> Advanced -> enable all cookie cases there)