IE9 丢失 Cookie
我在我的应用程序中使用会话。当使用IP地址访问应用程序时,我可以成功获取cookie。但是,如果我使用域名或本地主机,“有时” document.cookie 返回空,并且我无法检索 cookie。
更多信息:我在 Win7 中使用 IE9。我检查了以下文章,不确定我的情况出现问题的原因是什么。 http://blogs .msdn.com/b/ieinternals/archive/2009/08/20/wininet-ie-cookie-internals-faq.aspx
提前致谢。
I'm using session in my application. When accessing the application using IP address, I can get the cookie successfully. However, if I use domain name or localhost, "sometimes" document.cookie returns empty and I'm not able to retrieve the cookie.
More info: I'm using IE9 in Win7. I checked the following article and not sure what's the cause of the problem in my case.
http://blogs.msdn.com/b/ieinternals/archive/2009/08/20/wininet-ie-cookie-internals-faq.aspx
Thanks in advance.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我不确定您是否仍然需要它,但我发现的一件事是,在发现 IE 没有正确显示我们的网站,而 Firefox 和 Chrome 确实显示正确后。
http://www.aspnetresources.com/ blog/frames_webforms_and_rejected_cookies
我希望你已经解决了它和/或有人可以阅读我的链接的网站。
它与框架和cookie有关,但也许它也意味着具有不同域和重定向的东西。
因此,尝试从 Firefox 查看您的测试网站,如果是 IE,请使用该网站的修复程序
这是我的第一篇文章,希望它会对某人有所帮助。
Im not sure if you still needing it but one thing I discovered was this after finding out IE was not showing our website right while Firefox and Chrome do show up correct.
http://www.aspnetresources.com/blog/frames_webforms_and_rejected_cookies
I hope you solved it already and/or someone can read my linked website.
Its about frames and cookies, but maybe it also means someting with diferent domains and redirection.
So, try looking at your test website from Firefox, if its IE, use the fix from that website
its my first post here, hope it will help someone.
我遇到了类似的问题 - 虽然在 chrome、opera、ff、safari 会话上运行良好,但在 IE9 上,用户在访问不同站点时被随机注销。结果发现,问题在于在不同域上设置会话。
网站由 X.com 提供服务,而头像(通过 PHP 脚本访问必须经过授权)来自 static.X.com。更改为 X.com/static/ 有帮助。
I was experiencing a simillar problem - while on chrome,opera,ff,safari session worked well, on IE9 user was randomly logged out while accessing different sites. It came out, that the problem is in setting session on different domains.
Sites where served from X.com, while avatars(throught PHP script-access had to be authorized) from static.X.com. Changing to X.com/static/ helped.