Issue with Session and Cookie in Internet Explorer

2020-02-01 09:02发布

问题:

Recently we have created few websites with underscore (contains under website name). --------> example (xyz_mnp.com)

Issue is: Every time a page request cookie and session resets. It works fine with other browser but facing issue in IE

I search lots of thread but didn't find any solution yet.

Any help guys. Thanks

回答1:

Internet Explorer rejects all cookies with an underscore in the domain, because underscores are not allowed in DNS hostnames. This is a well-known limitation in IE, documented in http://blogs.msdn.com/b/ieinternals/archive/2009/08/20/wininet-ie-cookie-internals-faq.aspx

The workaround is to remove the underscore from the hostname.