为什么 AJAX 返回 HTTP 状态代码 0?

为什么 AJAX 返回 HTTP 状态代码 0?

问题描述:

出于某种原因,在使用 AJAX 时(使用我的 开发的应用程序)浏览器只是停止上传并返回 0 的状态代码.为什么会发生这种情况?

For some reason, while using AJAX (with my dashcode developed application) the browser just stops uploading and returns status codes of 0. Why does this happen?

另一种情况:

如果您发送了 AJAX 调用并且在获得 AJAX 响应之前触发了浏览器刷新,则可能会获得 0 的状态代码.AJAX 调用将被取消,您将获得此状态.

It could be possible to get a status code of 0 if you have sent an AJAX call and a refresh of the browser was triggered before getting the AJAX response. The AJAX call will be cancelled and you will get this status.