Wednesday, September 7, 2011

IE likes to cache ajax responses

To disable caching of ajax responses in IE when using jQuery use the following:

$.ajax({
  url: "./chat.php?type=json",
  cache: false,
  dataType: "json",
  success: function(data) {
    // Go do this, go do that…
}});


References:

http://i.justrealized.com/2008/jquerys-getjson-failing-randomly-in-internet-explorer

No comments:

Post a Comment