title: Failed to load resource: Request timed out on Safari
body: <p>We have a web application working correctly for over a year now on most browsers. 
  Recently we discovered it is not working that well on <strong>Safari</strong>.</p>
  
  <p>A lot of actions end up with the following error : <code>Failed to load resource: Request timed out</code>. Funny thing is the <strong>action is actually performed correctly</strong> after that (most of the time).</p>
  
  <p>When looking into the error, it seems to happen when there is an <strong>ajax</strong> request.</p>
  
  <p>First I tried to change the ajax timeout setting by doing the following :</p>
  
  <pre><code> $.ajax({
        "type"      : methode,
        "dataType"  : "json",
        "url"       : url,
        "async"     : async,
        "data"      : donneesEnvoyees,
        "timeout"   : 60000
   })
  </code></pre>
  
  <p>That didn't change anything at all, error is actually showing up after about 10 seconds which is less than the timeout defined.</p>
  
  <p>After reading a bit on the internet, I saw some answer about specifying no-cache so that safari doesn't keep the post parameters in cache.
   I cannot say I fully understand that, but I still tried the following way : </p>
  
  <pre><code>$.ajax({
       "type"      : methode,
       "headers"   : { "cache-control": "no-cache" }, &lt;-- added this line
       "dataType"  : "json",
       "url"       : url,
       "async"     : async,
       "data"      : donneesEnvoyees,
       "timeout"   : 60000
   })
  </code></pre>
  
  <p>As you can guess, I still get the same error.</p>
  
  <p>Do you have any idea of what is happening? Why is this error happening only on Safari and not other browsers? How to fix it?</p>