1

我有简单的 jquery/ajax 代码

$.ajax({
    url: "my_domain",
    type:"post",
    data: 'user_agent='+ window.navigator.userAgent+'&from='+self_loc,
    complete:function(res){
               console.log(res.responseText);
    }

})

在 php 中,我只响应了一个字符串,例如“test”;

它适用于 chrome + firefox+opera 但不适用于 IE8 有什么想法吗?谢谢 :)

4

1 回答 1

0

可能是您的 MIME 类型的问题。尝试使用您将返回到浏览器的内容类型设置标题。您可能还需要选择退出 IE8s MIME 嗅探。

前任:

<?PHP
Header("Content-Type: text/plain");
Header("X-Content-Type-Options: nosniff");
echo "test";
于 2013-07-10T17:49:00.063 回答