Jquery ajax, when periodicaly called, doesnt work on IE8

internet explorerjquery

I am currently doing the same ajax request using jQuery every 2sec. For some reason, on IE8 it only work the first time. Each following request automatically seems to go to the onSuccess function, with the same result as the first request.

The same code work perfeclty on FF3 and Chrome.

Is anybody aware of that bug and how to hack around it?
Or am I simply doing something wrong?

Best Answer

IE has a caching feature... it's possible that it has just cached your request. Make sure you append something like a random number to your query string, like so:

var url = "/yoururl.html";
url = url + "&random=" + Math.random();