title: jQuery ajax call stops when a download prompt is shown
body: <p>In the code below I use the jQuery ajax() function to do a longpolling call. While the ajax function is running, I click on the link to download Firefox (for example) and the ajax call stops.</p>
  
  <p>It actually acts like the call was succesful, but it wasn't, it simply stopped running.</p>
  
  <p>Why is that? I want to function to continue... </p>
  
  <p>I have seen this problem in Firefox and Chrome. I haven't tested other browsers.</p>
  
  <pre><code>    &lt;!DOCTYPE html&gt;
   &lt;html lang="en"&gt;
   &lt;head&gt;
     &lt;meta http-equiv="Content-Type" content="text/html; charset=utf-8"&gt;
  
     &lt;script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4/jquery.min.js" type="text/javascript"&gt;&lt;/script&gt;
  
     &lt;script type="text/javascript"&gt;
  
      function longPoller() {
  
          $.ajax({
              type: "GET",
              url: '/long-loading-page.php', /* &lt;?php sleep(5000); ?&gt; */
              dataType: 'json',
              async: true, 
              cache: false,
              timeout:50000, 
  
              success: function(data){ 
  
                  alert('success');
              },
              error: function(XMLHttpRequest, textStatus, errorThrown){
  
                  alert('error');
              },
  
              complete: function() { 
  
                  alert('complete');
                  }
  
          });
      }
  
  
       $(document).ready(function(){
          setTimeout(function(){ longPoller() }, 1000); //start the longPoller() function
       });
  
     &lt;/script&gt;
   &lt;/head&gt;
   &lt;body&gt;
  
     &lt;a href="http://download.mozilla.org/?product=firefox-3.6.9&amp;os=win&amp;lang=en-US"&gt;download Firefox! (clicking this link will stop the jQuery ajax call... why?)&lt;/a&gt;
   &lt;/body&gt;
   &lt;/html&gt;
  </code></pre>