
AJAX: Status of “0” for an XMLHttpRequest
If you experience getting a status of “0” returned during an XMLHttpRequest, then the problem could be the result of several things. However, a status of “0” for an XMLHttpRequest (XHR) in AJAX quite often indicates a network error or a CORS (Cross-Origin Resource Sharing) issue. You might especially see this problem if you’re developing on a local machine, and trying to access a remote resource of some sort, and you probably need to set the Access-Control-Allow-Origin header. Here’s how.
Continue reading »