title: How to trap "Failed to load resource" error caused from ajax call using JQuery
body: <pre><code>$.post("server.php", data)
    .done(function(data){
      //do something
    })
    .fail(function(xhr,status,error){
      //print the error
    });
  </code></pre>
  
  <p>I am sending some data to a webservice using Jquery post method, but if server.php is down or does not exist then this call fail but does not capture any error message. However in browser console i can see "Failed to load resource" error. Is there any way to trap this error message?</p>