Chrome数据压缩会导致Ajax错误

问题描述 投票:1回答:2

chrome数据压缩启用会导致Ajax错误。

当我启用chrome数据压缩时,我的ajax函数出错了。这很重要,因为默认情况下安装了移动Chrome,并启用了数据压缩。

Ajax错误函数参数:

status=0 ,responseText="" readyState=0

Chrome控制台:

GET http://example.com/GetData.ashx?_=1413205947410 net::ERR_SPDY_PROTOCOL_ERROR 

i.support.ajax.i.ajaxTransport.send                        :     jquery-1.7.2.js:8241
i.extend.ajax                                              :      jquery-1.7.2.js:8241

我的ajax功能:

load = function (proxyPageName) {

    $.ajax({
        type: "GET",  //I have try POST 
        url:  document.location.protocol + "//" + document.location.host + proxyPageName + ".ashx" ,
        dataType: "text",
        success: function (msg) {
            //when disabled chrome data compression 

        },
        error: function (xhr,options,error) {
            //when enable chrome data compression 
        }
    });
}

服务器上未记录任何错误。

jquery ajax html5 google-chrome gzip
2个回答
0
投票

我最近在3个独立系统的服务器升级后看到了这个错误,这些系统都具有相同的行为。

我在Chrome中为所有用户看到了它,但只是间歇性地看到了。

通过让他们使用Chrome的网站“空缓存和硬重新加载”刷新功能,我能够为所有用户解决这个问题。 (对于Chrome工具,F12,右键单击刷新按钮)

我怀疑它与正在使用的SSL证书缓存的内容有关。


-1
投票

你在运行Windows 10吗?我一个月前遇到过这个问题,这真的很棘手。首先,我尝试通过disabling SPDY修复Chrome,但它仅对Chrome有帮助,但在尝试访问我的IIS的其他计算机上也是如此。

实际问题出在Windows 10本身。试试this trick with editing registry。我希望它有所帮助。

© www.soinside.com 2019 - 2024. All rights reserved.