asp.net禁用頁面緩存
ASP.NET
Response.Cache.SetCacheability(HttpCacheability.NoCache);
ASP:[在.net下也行]
Response.Expires = 0;
Response.Buffer = true;
Response.ExpiresAbsolute = DateTime.Now.AddSeconds(-1);
Response.AddHeader("pragma", "no-cache");
Response.CacheControl = "no-cache";
//也就是通过禁止缓存,来实现重新刷新,这样页面即使在遇到back,也会自动刷新
Response.Cache.SetCacheability(HttpCacheability.NoCache);
ASP:[在.net下也行]
Response.Expires = 0;
Response.Buffer = true;
Response.ExpiresAbsolute = DateTime.Now.AddSeconds(-1);
Response.AddHeader("pragma", "no-cache");
Response.CacheControl = "no-cache";
//也就是通过禁止缓存,来实现重新刷新,这样页面即使在遇到back,也会自动刷新