解决jQuery.ajax在IE, FireFox可以正常执行。Chrome,360极速模式中无法正常执行。
2013-09-30 17:23
751 查看
解决jQuery.ajax在IE, FireFox可以正常执行。Chrome,360极速模式中无法正常执行。
今天遇到问题,已经搞了半天了,总结一下。
找到:http://forum.jquery.com/topic/load-and-ajax-not-working-on-google-chrome
Using jQuery
里面有个人说的原文如下:
Please look at this page:
http://www.mail-archive.com/qooxdoo-devel@lists.sourceforge.net/msg29542.html
When you are getting ajax content from a server asp.net page, beware on usingthe Response.Close() at end.
This would send all buffered data toclient, but also send a "Reset by peer" signal that close the socket.
IE/FF just handle it well, but Chrome can0thandle this, returning an internal Network Error 101 on xhr.Send().
If you dont useResponse.Close() on your server code, $.ajax will work just fine also onchrome.
Hope this helps.
大概意思是:
当你从一个ASP.NET服务端用AJAX获取内容时,小心使用Response.Close()结尾。
这会将所有缓冲数据发送到客户端,而且还发出一个“Resetby peer”信号,关闭Socket连接。
IE / FF就处理得很好,但Chrome不能处理,它会在执行“xhr.Send()”方法去获取数据时.返回一个“an internal Network Error 101”的错误。
如果你在你的服务端代码中不使用“Response.Close()”,$.Ajax会在chrome浏览器中运行得很好。
希望这会有所帮助。
开始,我以为不是服务端的问题,是浏览器支持Ajax的问题,后台代码中使用了Response.Close(),
而且,它说的 “dont use”我以为是要使用这句,而不是不使用这句,搞了老半天,还有的说是Ajax跨域的问题,
我的是使用一个新的服务,在主站下面建立了一个虚拟目录,我觉得也不是跨域的问题呀,真无语。
后来没办法了,把后台代码中的某些会出问题的语句一行行的删除来尝试,终于删除Response.Close()这句之后就可以了!!!
今天遇到问题,已经搞了半天了,总结一下。
找到:http://forum.jquery.com/topic/load-and-ajax-not-working-on-google-chrome
Using jQuery
里面有个人说的原文如下:
Please look at this page:
http://www.mail-archive.com/qooxdoo-devel@lists.sourceforge.net/msg29542.html
When you are getting ajax content from a server asp.net page, beware on usingthe Response.Close() at end.
This would send all buffered data toclient, but also send a "Reset by peer" signal that close the socket.
IE/FF just handle it well, but Chrome can0thandle this, returning an internal Network Error 101 on xhr.Send().
If you dont useResponse.Close() on your server code, $.ajax will work just fine also onchrome.
Hope this helps.
大概意思是:
当你从一个ASP.NET服务端用AJAX获取内容时,小心使用Response.Close()结尾。
这会将所有缓冲数据发送到客户端,而且还发出一个“Resetby peer”信号,关闭Socket连接。
IE / FF就处理得很好,但Chrome不能处理,它会在执行“xhr.Send()”方法去获取数据时.返回一个“an internal Network Error 101”的错误。
如果你在你的服务端代码中不使用“Response.Close()”,$.Ajax会在chrome浏览器中运行得很好。
希望这会有所帮助。
开始,我以为不是服务端的问题,是浏览器支持Ajax的问题,后台代码中使用了Response.Close(),
而且,它说的 “dont use”我以为是要使用这句,而不是不使用这句,搞了老半天,还有的说是Ajax跨域的问题,
我的是使用一个新的服务,在主站下面建立了一个虚拟目录,我觉得也不是跨域的问题呀,真无语。
后来没办法了,把后台代码中的某些会出问题的语句一行行的删除来尝试,终于删除Response.Close()这句之后就可以了!!!
相关文章推荐
- 让360双核浏览器默认极速模式,避免采用IE模式无法正常访问html5网页的解决办法
- [转]IE9.0或者360下js(JavaScript、jQuery)不能正确执行(加载),按F12后执行正常;Firefox下ajax的success返回数据data(json、string)无法获取
- IE9.0或者360下js(JavaScript、jQuery)不能正确执行(加载),按F12后执行正常;Firefox下ajax的success返回数据data(json、string)无法获取
- IE9.0或者360下js(JavaScript、jQuery)不能正确执行(加载),按F12后执行正常;Firefox下ajax的success返回数据data(json、string)无法获取
- 其他浏览器(firefox,chrome)可以上网 ie(Internet Explorer)无法上网 解决方法
- Jquery的ajax调用在ie可以但在firefox无法转换造成错误
- firefox ie chrome 设置单元格宽度 td width 有bug,不能正常工作。以下方式可以解决
- 解决网站中上传的图片在IE中不显示 chrome firefox下却正常
- Jquery在IE7下无法使用 $.ajax解决方法
- Jquery在IE7下无法使用 $.ajax解决方法
- 在IE下正常显示但Chrome下无法显示的解决方法
- fusionchart图表遮挡Ext下拉控件或日期控件解决办法(IE下有问题firefox与chrome正常)
- 解决jQuery uploadify3.2 IE6 IE7 或者 firefox下不显示,chrome IE8 IE9却正常
- 图片在ie下无法正常显示,在firefox或chrome正常显示的原因
- Ajax请求在IE和Google Chrome中可以响应,在Firefox中无法响应
- Scala可以在交互模式下运行但无法执行脚本的解决方法
- MVC使用uploadify3.1 IE下正常 firefox、chrome出现HTTPERROR 302错误解决办法
- firefox和chrome中 JQuery的ajax组件执行差异
- jquery用ajax向ashx传递数据,测试360,FIrefox都支持,唯独IE出现
- 解决jquery 修改onclick事件后IE兼容模式下立刻执行的问题