title: What does "XMLHttpRequest.timeout cannot be set for synchronous http(s) requests made from the window context" mean?
body: <p>I'm getting some timeouts on a synchronous xml http request in Safari on a Mac.  As a workaround, I tried adding a timeout like so:</p>
  
  <pre><code>    req.open(this.method, fullURL, this.isAsync);
      req.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
  
      var params = this.envelopeForm();
      req.setRequestHeader("Content-length", params.length);
      req.timeout = 60000;  //Get the timeut cannot be set here
      req.send(params);  //Without the above, get a timeout here in Safari
  </code></pre>
  
  <p>With the .timeout = 60000 I'm getting a timeout on the .send.  </p>
  
  <p>With the .timeout=60000, I'm getting the "XMLHttpRequest.timeout cannot be set for synchronous http(s) requests made from the window context."</p>
  
  <p>I'm not clear on what "XMLHttpRequest.timeout cannot be set for synchronous http(s) requests made from the window context" means.  I also found it in mozilla's documentation phrased like so:</p>
  
  <p>Note: You may not use a timeout for synchronous requests with an owning window.</p>
  
  <p>Is there a work-around for this?  On the MSDN site I found the following statement regarding Internet Explorer:  </p>
  
  <p>If you set an XMLHttpRequest time-out value that is larger than the network stack's time-out value, the network stack will time out first and the ontimeout event will not be raised</p>
  
  <p>-Eric</p>