[英]JQuery ajax(), or load() return incomplete response in IE. Works fine in Chrome
When using JQuery's asynchronous method to GET a remote URL through either ajax()
or load()
, the returned response is corrupted in IE but completely correct in Chrome. 当使用JQuery的异步方法通过
ajax()
或load()
获取远程URL时,返回的响应在IE中已损坏,但在Chrome中完全正确。
Here is the sample code 这是示例代码
$('#contactEmailPanelBody .panel-body').load('contact/email/list/' + id, function(response, status, xhr) {
console.log('status=' + status);
console.log('head=' + xhr.getResponseHeader('contentType'));
console.log('response=' + response);
});
The response is incomplete and corrupted when using IE/11. 使用IE / 11时,响应不完整且已损坏。 But the complete correct document was successfully returned when using Chrome.
但是使用Chrome时,成功返回了完整正确的文档。
I've done a lot research and seems this is not caused by cache. 我做了很多研究,看来这不是由缓存引起的。 It seems some weird behavior of IE.
看来IE有一些怪异的行为。
Any help? 有什么帮助吗? Thanks!
谢谢!
I think of 2 possible reasons: 我认为有两个可能的原因:
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.