title: Jquery async calls block page reload
body: <p>I have a function that performs a backup every 5 seconds. From time to time the target server of the backup is not reachable and the request stops until the timeout is reached.
  Since this affects the user interface I execute this 'backup function' as a async ajax request.</p>
  
  <pre><code>setInterval("doSync()", 5000 );
  
  function doSync() {    
       $.ajax({
           url: "backup.php",
           async : true
       });
   };
  </code></pre>
  
  <p>This runs pretty good in the background. 
  But as soon as a reload of the page is executed, already waiting backup function calls will be completed. So in the worst case, if I have a backup with 30 seconds timeout, the user has to wait this 30 seconds before the new page is loaded.
  That is not acceptable for the user.</p>
  
  <p>Which strategy can I implement to avoid this? 
  It would be ok to terminate the backup request...</p>