在 IE9 中,我尝试使用 cookie 发出跨源请求。但是,即使我将 Access-Control-Allow-Origin、Access-Control-Allow-Credentials、Access-Control-Allow-Methods 全部设置为适当的值(原始域、true 和 GET、POST),IE9仍然没有发送或设置请求中的 cookie。这是我正在使用的脚本:
var xdr = new XDomainRequest()
xdr.open("http://mydomain.com/cors.php")
xdr.withCredentials = true;
xdr.send();
关于如何让 cookie 与 IE9 中的 CORS 请求配合使用,您有什么想法吗?
从这个页面http://blogs.msdn.com/b/ieinternals/archive/2010/05/13/xdomainrequest-restrictions-limitations-and-workarounds.aspx http://blogs.msdn.com/b/ieinternals/archive/2010/05/13/xdomainrequest-restrictions-limitations-and-workarounds.aspx在底部你可以看到Update: Internet Explorer 10 now supports CORS using XMLHTTPRequest.
这意味着 IE9 中没有正确处理 CORS。对不起。他们在同一篇文章中提出了一些代理的解决方法。
浏览器兼容性矩阵位于http://caniuse.com/cors http://caniuse.com/cors部分支持是指
Internet Explorer 8 通过 XDomainRequest 对象提供支持,但不支持凭据请求http://code.google.com/p/sgvizler/wiki/Compatibility http://code.google.com/p/sgvizler/wiki/Compatibility.
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)