Internet Explorer ignores cookies on some domains (cannot read or set cookies)

cookiesinternet explorer

I have a site, e.g. example.com, where users can set their own subdomains (one user – one subdomain) and upload their own scripts, e.g. http://somedomain.example.com/xyzzy.php would map to /www/somedomain/xyzzy.php

Now, on some of those domains, Internet Explorer 7 won't/can't accept cookies. Checked with Fiddler: the server sends Set-Cookie response correctly, yet the cookie never shows up in IE – for JS or Developer Tools. On request, IE7 doesn't send the Cookie header either.

The cookies are set for the user's domain (e.g. somedomain.example.com), path is /, tried different expiration options (past, future, current, "0"), are not HttpOnly, are not secure.

FF, Opera, Safari and Chrome all work without problems.

Why does IE ignore the cookies?

Best Answer

Does one of the subdomains use an underscore? IE has problems accepting cookies from subdomains that don't follow the URI RFC.