我通常将request.status == 0
翻译为连接失败。
但是,我发现Internet Explorer有时使用HTTP 12007。
当我决定是告诉用户"互联网失败"还是只告诉他们"HTTP状态码x"时,你会推荐我使用什么规则?
12007是这类事情的唯一代码吗?(除了零)
status
值超过12000来自Windows,并告诉你,HTTP请求本身失败了(即。没有请求)。
您可以在这里找到这些错误消息的列表