Response.Buffer = true;
Response.ExpiresAbsolute = System.DateTime.Now.AddSeconds(-1);
Response.Expires = 0;
Response.CacheControl = "no-cache";
Response.AddHeader("Pragma", "No-Cache");这样为什么不能清楚浏览器缓存?请高手指教。
Response.ExpiresAbsolute = System.DateTime.Now.AddSeconds(-1);
Response.Expires = 0;
Response.CacheControl = "no-cache";
Response.AddHeader("Pragma", "No-Cache");这样为什么不能清楚浏览器缓存?请高手指教。
大家都是这样写的
(1) Response.Buffer = true;
Response.ExpiresAbsolute = System.DateTime.Now.AddSeconds(-1);
Response.Expires = 0;
Response.CacheControl = "no-cache";
Response.AddHeader("Pragma", "No-Cache");
(2) HTML方法
<HEAD>
<META HTTP-EQUIV="Pragma" CONTENT="no-cache">
<META HTTP-EQUIV="Cache-Control" CONTENT="no-cache">
<META HTTP-EQUIV="Expires" CONTENT="0">
</HEAD>
我按照这样的方法写 还是能够后退的原来的页面上去。
<META http-equiv=Cache-Control content=no-cache>
<META http-equiv=Expires content=0>Response.Cache.SetNoStore();
Response.Cache.SetCacheability(System.Web.HttpCacheability.NoCache);
//C#清除本地浏览器缓存
Response.Cache.SetCacheability(HttpCacheability.NoCache);这样应该就可以了
<META http-equiv=Cache-Control content=no-cache>
<META http-equiv=Expires content=0>Response.Cache.SetNoStore();
Response.Cache.SetCacheability(System.Web.HttpCacheability.NoCache); 这个网上一搜一大把