title: How to ignore an ajax timeout?
body: <p>We want to leave the decision to the user to cancel (abort) the request or waiting for the response. When an timeout occurs, an confirm dialog should appear that offers the user the opportunity to wait for the response or abort the request:</p>
  
  <pre><code>$.ajax({
      [...]
      timeout: 2000,
      success: function(data) {   
          [...]
      };   
  });
  
  
  $.ajaxSetup({
      error: function(data, textStatus, pStatusDescription) {
  
           if(textStatus === "timeout")
           {
              if(confirm("Do you want to wait for the response?"))
              {
                  // continue request
              }
              else
              {
                  // abort request
              }
           }
      }
  });
  </code></pre>