Internet Explorer会忽略某些网域上的Cookie(无法读取或设置Cookie) [英] Internet Explorer ignores cookies on some domains (cannot read or set cookies)

查看:132
本文介绍了Internet Explorer会忽略某些网域上的Cookie(无法读取或设置Cookie)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个网站,例如 example.com ,其中用户可以设置自己的子域(一个用户 - 一个子域),并上传自己的脚本,例如 http://somedomain.example.com/xyzzy.php 会映射到 /www/somedomain/xyzzy.php



现在,在其中一些网域上,Internet Explorer 7将不会/不能接受Cookie。检查与Fiddler:服务器发送Set-Cookie响应正确,但cookie永远不会出现在IE - 对于JS或开发工具。根据请求,IE7不会发送Cookie头。



Cookie是为用户的域设置的(例如 somedomain.example.com ),路径是 / ,尝试不同的到期选项(过去,未来,当前,0),不是HttpOnly, / p>

FF,Opera,Safari和Chrome均可正常运作。



为什么IE会忽略Cookie? p>

解决方案

其中一个子域是否使用下划线? IE有问题接受来自子域的cookie不遵循URI RFC。 ( http://www.ietf.org/rfc/rfc2396.txt


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?

解决方案

Does one of the subdomains use an underscore ? IE has problems accepting cookies from subdomain's that dont follow the URI RFC. (http://www.ietf.org/rfc/rfc2396.txt)

这篇关于Internet Explorer会忽略某些网域上的Cookie(无法读取或设置Cookie)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆