gpt4 book ai didi

ajax - IE9 中的 jQuery AJAX 请求不发送 Cookie header

转载 作者:行者123 更新时间:2023-11-30 23:45:10 24 4
gpt4 key购买 nike

我正在使用 jQuery 的 ajax .get 方法从我的服务器检索数据。在 Chrome 中工作完美,但在 IE9 中它不发送 Cookie header ,这会破坏应用程序。知道为什么吗?这是 jQuery 代码:

$.get(this.server + 'rest/photo/' + this.profileId + '/count', function(data) {
$('#imageCount').html(data);
});

最佳答案

我这里也有同样的问题,我无法让 jQuery .ajax() 函数工作。我发现的唯一解决方法是:

<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE8" /> 

您可以将此元标记添加到页面顶部以使其正常工作。但感觉不是一个好的解决方案。我认为问题在于 IE9 中的 xmlhttprequest 对象不同,因此 jQuery 无法找到相应的对象,因此 ajax 不会触发。

关于ajax - IE9 中的 jQuery AJAX 请求不发送 Cookie header ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6136101/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com