Internet Explorer 忽略某些域上的 cookie(无法读取或设置 cookie)

编程入门 行业动态 更新时间:2024-10-15 12:31:16
本文介绍了Internet Explorer 忽略某些域上的 cookie(无法读取或设置 cookie)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

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

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

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

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.

cookie 是为用户的域设置的(例如 somedomain.example),路径是 /,尝试了不同的过期选项(过去、未来、当前、"0"),不是 HttpOnly,不安全.

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

FF、Opera、Safari 和 Chrome 都可以正常工作.

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

为什么 IE 会忽略 cookie?

Why does IE ignore the cookies?

推荐答案

其中一个子域是否使用下划线?IE 无法接受来自不遵循 URI RFC 的子域的 cookie.

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

更多推荐

Internet Explorer 忽略某些域上的 cookie(无法读取或设置 cookie)

本文发布于:2023-11-07 23:45:21,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1567759.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:Internet   Explorer   cookie

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!