在$.ajax方法的options参数中可以设置
$.ajax{
{
url: 'xxx',
data : 'xxx',
cache: false
}
或者手动在url后面加一个随机参数 比如 $.getJSON("cart/cartheader/?_r=" + Guid.NewGuid()
$.ajax{
{
url: 'xxx',
data : 'xxx',
cache: false
}
或者手动在url后面加一个随机参数 比如 $.getJSON("cart/cartheader/?_r=" + Guid.NewGuid()
不行啊!!我这样的调用的话没办法参数的,用的是JQ内置 getJson方法
不行啊!!我这样的调用的话没办法参数的,用的是JQ内置 getJson方法
jq的内置getJson只是$.ajax的简写形式,好好看看jq的文档吧
context.Response.Headers["Last-Modified"] = Refresh.ToString();
//context.Response.Cache.SetExpires(DateTime.Now.Add(Refresh));
//context.Response.Cache.SetMaxAge(refresh);
context.Response.Cache.SetCacheability(HttpCacheability.Public);
context.Response.CacheControl = HttpCacheability.Public.ToString();
context.Response.Cache.SetValidUntilExpires(true);
服务端告诉浏览器不要缓存~上面的代码不一定行~自己找其他属性或方法