title: abort previous request when current request start in Datatable
body: <p>I used this code for DataTable...</p>
  
  <pre><code>$('#table').DataTable({
      "destroy": true,
      "processing": true,
      "serverSide": true,
      "columnDefs": [{
              "targets": 0,
              "orderable": false
          }],
      "ajax": {
          url: baseURL + checkVal,
          type: "post",
          xhr: function () {
              var xhr = $.ajaxSettings.xhr();
              xhr.upload.onprogress = function (e) {
                  xhr.abort(); //abort all current request here
              };
              return xhr;
          },
          error: function () {
              $(".employee-grid-error").html("");
              $("#table").append('&lt;tbody class="employee-grid-error"&gt;&lt;tr&gt;&lt;th colspan="3"&gt;No data found in the server&lt;/th&gt;&lt;/tr&gt;&lt;/tbody&gt;');
          }
      },
      'initComplete': function (settings, json) {
          //code here
      }
  });
  </code></pre>
  
  <p>when I abort it will abort all current request... I want to stop all previous request when current request start running ... How to do that...</p>
  
  <p>I used your all code which is posted in answer. But I can't get any value of <strong>settings.jqXHR</strong> or <strong>settings.jqXHR.abort()</strong> anywhere...</p>
  
  <p>Please help me how to abort all previous request..</p>
  
  <p>Thanks in advance :)</p>