【发布时间】:2012-11-21 19:18:05
【问题描述】:
我有一个简单的 ajax 请求,它适用于除 IE9 之外的所有现代浏览器(当然)。在 IE9 中,响应返回为 200,成功函数触发,但没有返回数据。
这里是js:
function getMapPins(section){
$('.spinnerBG').fadeIn('fast');
$.ajax({
type: 'POST',
url: '/ourprojects_ajax.html',
data: {'map_section':section},
cache:false,
success: function(data){
//alert(data);
$('#mapPins').append(data);
createPins(section);
}
});
}
只是为了确保它不是 PHP:
<?php echo '<p>why won't this damn thing work in IE9</p>'; ?>
有什么想法吗?
【问题讨论】:
-
在IE的开发者工具中查看响应体是完全空的,响应头Content-Length为0
-
我知道你的 ajax 调用中已经有 cache:false 了.. 但是为了傻笑试试这个 - 在你所有的 js 代码把它放在那里之前 $.ajaxSetup({cache:false});跨度>
标签: php jquery ajax internet-explorer-9