This is annoying, but does not go against the HTTP specification, which states that GET requests are cacheable, whereas POST results are not. AJAX requests seem to generally default to GET (JQuery certainly does), so IE caches them.
Therefore, the solution is to make sure that AJAX requests use POST rather than GET. In jQuery, you can do this by setting:
For Prototype, you can set:
In the jQuery.ajax() method, there is also a ‘cache’ setting, which is true by default, but can be set to false, which prevents caching. It does this by appending a TIMESTAMP to the URL, so that each request is made to a different URL, so a cached result cannot be returned. If not using jQuery, an alternative to ensuring that your request is a POST request rather a GET request is to add a ‘cache-busting’ parameter, e.g. a timestamp, to the end of the request URL, e.g.:
var cacheBuster = new Date().getTime(); //Get timestamp var url = 'http://www.example.com/getdata?cb=' + cacheBuster; //Add timestamp to URL