Note that there are some explanatory texts on larger screens.

plurals
  1. POXMLHttpRequest fails with HTTPS / MSIE 10 / POST / Lots of requests
    primarykey
    data
    text
    <p>I've got some software that works well in a lot of cases, but fails badly with MSIE 10. I've broken it down to the simplest test case I can, shown below. XMLHttpRequest will sometimes work, but more often it will wait for 5 to 10 seconds (that times changes constantly) and then return with a status code 0.</p> <p>It is only the <strong>combination</strong> of HTTPS &amp; MSIE 10 &amp; Lots of POST requests. Changing any one of these will cause things to work again.</p> <ul> <li>Other browsers work fine, including MSIE 8. It's not a server problem. I can have 10 copies of the test program running at once on chrome with no issues.</li> <li>It's only HTTPS. When I switch to HTTP everything works fine. (The same server is listening to both ports, serving the same software.) My temporary work around is showing people the HTTP address, but I don't like that.</li> <li>This only happens with a POST request. When I change my test program to do a GET instead of a POST, everything works fine. Unfortunately that's not an option for the real program.</li> <li>This only happens after a lot of continuous requests. Often it will be fine for a few requests, then start failing. Hitting refresh doesn't help. It's like the browser, not my script, is having trouble.</li> </ul> <p>Has anyone seen a problem like that? Do you know how to fix it?</p> <pre><code>&lt;HTML&gt; &lt;HEAD&gt; &lt;TITLE&gt;test&lt;/TITLE&gt; &lt;SCRIPT&gt; &lt;!-- var count = 0; function addLine(line) { var newDiv = document.createElement("div"); newDiv.innerText = line; document.body.appendChild(newDiv); } function my_main() { addLine("script started"); scheduleRequest(); } function scheduleRequest() { try { if (count &lt; 50) { count++; //setTimeout(sendRequest, 1); sendRequest(); } else addLine("Done!"); } catch (err) { addLine("Exception in scheduleRequest(): " + err.message); } } function sendRequest() { try { var xmlhttp = new XMLHttpRequest(); xmlhttp.open("POST","t.php?nocache="+Math.random(),true); xmlhttp.onreadystatechange=function() { if (xmlhttp.readyState == 4) { var success = (xmlhttp.responseText == "yes\n") &amp;&amp; (xmlhttp.status == 200); var status = "#" + count + ": "; if (success) status += "success."; else status += "FAIL. status=" + xmlhttp.status; addLine(status); scheduleRequest(); } } xmlhttp.send("sequence=5"); } catch (err) { addLine("Exception in sendRequest(): " + err.message); } } --&gt; &lt;/SCRIPT&gt; &lt;/HEAD&gt; &lt;BODY ONLOAD="my_main()"&gt; &lt;div&gt;Let's go!&lt;/div&gt; &lt;/BODY&gt; &lt;/HTML&gt; </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload