Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

jQuery caches AJAX request in IE even though cache: "false" is set

I have the following code

$.ajax({type: "GET",
  url: "/" + filename,
  dataType: "xml",
  cache: "false",
  success: function(xml)
{
    /* Parsing code here */
}});

In Chrome etc the requests are not cached, however they are in IE. Am I constructing my request properly?

like image 403
Chris Avatar asked May 06 '10 15:05

Chris


1 Answers

cache should be a boolean, not a string:

$.ajax({type: "GET",
  url: "/" + filename,
  dataType: "xml",
  cache: false,
  success: function(xml){
    /* Parsing code here */
  }  
});
like image 104
Matt Avatar answered Oct 25 '22 08:10

Matt