客户端:
<html>
<head>
<meta http-equiv="Expires" CONTENT="0">
<meta http-equiv="Cache-Control" CONTENT="no-cache">
<meta http-equiv="Pragma" CONTENT="no-cache">
</head>
服务器端:
Response.Buffer = true;
Response.ExpiresAbsolute = DateTime.Now.AddDays(-1);
Response.Cache.SetExpires(DateTime.Now.AddDays(-1));
Response.Expires = 0;
Response.CacheControl = "no-cache";
Response.Cache.SetNoStore();
Global:
protected void Application_BeginRequest(Object sender, EventArgs e)
{
HttpContext.Current.Response.Cache.SetNoStore();
}
<%@ OutPutCache Location="None"%>
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,也会自动刷新