由於用戶在http返回前關閉/取消,或者防火牆等原因,會造成http請求沒有status信息。w3c有相應的說明:http://www.w3.org/TR/XMLHttpRequest/#the-status-attribute
4.7.1 The status
attribute
-
client . status
-
Returns the HTTP status code.
The status
attribute must return the result of running these steps:
-
If the error flag is set, return 0.
-
Return the HTTP status code.