Using jQuery's $.ajax() function. Wherether the request has been purposely aborted, or if the server is down (not responding) it appears the same outcome happens;

That is the "success" handler gets triggered where *xmlHttpRequest.status = 0* and *xmlHttpRequest.readyState = 4*.

(I simulated the failed request by shutting off IIS, and then executing a xmlHttpRequest against the website that had been "turned off")

So my question is how can I determine the difference between an aborted request, or a request that genuinely failed due to the server not responding (because maybe the server is down), since both scenarios appear to give me the same status/readyState?

**EDIT**
More accurately I want to know how to prevent calling the "success" handler after the .abort() function is called on ajax.

I have re-worded the question to reflect this.