ajax 12301 原因小结

    很多同学在web ajax时遇到 status 12301 的错误,误以为是jQuery的错误。 jQuery 官方给出的解释是“
As you mentioned,error 12031 is coming from the Winsock stack and means "connection reset".If you have any third-party toolbars or firewall software you should probably remove them.But again,the jQuery bug tracker is not an ideal place to troubleshoot a general problem like this.

    经过个人试验,可能由以下几个因素引起:

    1.文件编码不一致:

        1.1 web页面编码与js文件编码不一致

        1.2 web母版页与web页在编码不一致 

        1.3 页面html meta 指定的编码与web页在编码不一致

    2.ajax请求的路径为中文

    3.页面载入时多个并行的 post ajax

    以上想法仅供朋友们参考。

 

posted @ 2013-03-29 21:53  life++  阅读(381)  评论(0编辑  收藏  举报