jQuery的缓存AJAX请求在IE中,即使缓存:"假"设置 [英] jQuery caches AJAX request in IE even though cache: "false" is set

查看:105
本文介绍了jQuery的缓存AJAX请求在IE中,即使缓存:"假"设置的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有以下的code

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

在Chrome浏览器等方面的请求不会被缓存,但它们在IE浏览器。我是否构建了我的请求是否正确?

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

推荐答案

缓存应该是一个布尔值,而不是字符串:

cache should be a boolean, not a string:

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

这篇关于jQuery的缓存AJAX请求在IE中,即使缓存:"假"设置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆