The status of the response, xhr.status
, is (generally) used to determine whether the request was successful or not. xhr.readyState
is simply used to determine the state of the request, such as "has not yet been sent" (0), "complete and response received" (4), etc.
The server is responsible for providing the status
, while the user agent provides the readyState
.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…