Why is AJAX returning HTTP status code 0?

后端 未结 20 3186
野的像风
野的像风 2020-11-22 06:39

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?

20条回答
  •  感动是毒
    2020-11-22 07:11

    In my experience, you'll see a status of 0 when:

    • doing cross-site scripting (where access is denied)
    • requesting a URL that is unreachable (typo, DNS issues, etc)
    • the request is otherwise intercepted (check your ad blocker)
    • as above, if the request is interrupted (browser navigates away from the page)

提交回复
热议问题