For a dynamic page, I use Ajax Long Polling and even with jQuery 1.9, Internet Explorer freezes after the first request.
The script code is based on the article Simple Long Survey Using JavaScript and jQuery
<script type="text/javascript" charset="utf-8">
$(document).ready(function(){
(function poll(){
$.ajax({ url: "ajaxstats.json", success: function(data){
$("button.requests" ).empty().append(data.requests);
}, dataType: "json", complete: poll, timeout: 30000 });
})();
});
</script>
The console does not show errors.
IE Network Monitor immediately shows many resource requests ajaxstats.jsonwith response times <1 ms and 304 (not modified). The response body is correct (JSON code).
Server code always delays the response by 1000 milliseconds. And in Firefox, the Firebug XHR log shows that each request takes about 1000 milliseconds, as expected.
The HTTP response code is different from Firefox and Internet Explorer:
- in Firefox: response code
200 ok - Internet Explorer 9,
304 (not modified)
IE?