I usually translate request.status == 0
as being a connection failure.
However, I have found that Internet Explorer sometimes uses HTTP 12007.
What would you recommend be the rules I use when deciding whether to tell the user "Internet Failure" vs just telling them "HTTP Status Code x"?
Is 12007 the only code for this sort of thing? (besides zero)
The HTTP 402 Payment Required is a nonstandard response status code that is reserved for future use. This status code was created to enable digital cash or (micro) payment systems and would indicate that the requested content is not available until the client makes a payment.
The HTTP 200 OK success status response code indicates that the request has succeeded. A 200 response is cacheable by default. The meaning of a success depends on the HTTP request method: GET : The resource has been fetched and is transmitted in the message body.
The HTTP 205 Reset Content response status tells the client to reset the document view, so for example to clear the content of a form, reset a canvas state, or to refresh the UI.
TCP port 443 is the default port used by HTTPS. If this port is blocked on any server or device from your computer to a given destination, such as www.Microsoft.com, your connection to any https site will fail and your browser will return an error message like "Secure Connection Failed" or "Page Cannot be Displayed" .
status
values above 12000 come from Windows and tell you, that the HTTP request itself failed (ie. there never was a request).
You can find a list of these error messages here.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With