I have been working with a team of developers for some projects. we have come across an issue, that we cannot figure out very well.
The site we are building is run mostly on AJAX Requests.however on some client systems, it seems that ALL ajax requests are blocked. They cannot get any data from server.We found that most of these cases arise from firewalls installed on those client systems.
E.g:
error: function(XMLHttpRequest, textStatus, errorThrown) {
if (XMLHttpRequest.readyState == 4) {
// HTTP error (can be checked by XMLHttpRequest.status and XMLHttpRequest.statusText)
}
else if (XMLHttpRequest.readyState == 0) {
// Network error (i.e. connection refused, access denied due to CORS, etc.)
}
else {
// something weird is happening
}
}
I expected when readyState = 0, that Ajax call is being blocked by firewall. But, That is not a exact result.Obviously When your internet is down. It shows readystate = 0.
Is there any method/result to trace that the ajax call is surely blocked by firewall.