I'm trying to implement long polling using Netty and jQuery.
I have it working correctly with Chrome and Firefox, but Internet Explorer 8 is causing me problems.
I'm executing the following code which sends a request to my server, waits until a response is received from the server and then sends another request.
function longPollRequest() {
$.ajax({
url: '/test-path',
type: 'GET',
success: function(data, textStatus, jqXHR) {
longPollRequest();
console.log('Received: ' + data);
}
});
}
However, in IE8 I'm running into an infinite loop, which is freezing the browser. The interesting part is that my server is only receiving the first request from IE. I'm really puzzled as to what is going on. If anyone has any ideas I would really appreciate the help.
function longPollRequest() {
instead. Is that just a typo in your post? – Lenee