Why is AJAX returning HTTP status code 0?

后端 未结 20 2792
野的像风
野的像风 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:28

    In my case, it was caused by running my django server under http://127.0.0.1:8000/ but sending the ajax call to http://localhost:8000/. Even though you would expect them to map to the same address, they don't so make sure you're not sending your requests to localhost.

提交回复
热议问题