Response.CacheControl = "no-cache";
Response.ExpiresAbsolute = DateTime.Now.AddDays(-1);
Response.Cache.SetExpires(DateTime.Now.AddDays(-1));
Response.Cache.SetNoStore();
Response.Expires = 0;
Response.Buffer = false;
Response.ExpiresAbsolute = DateTime.Now.Subtract(new TimeSpan(10, 10, 10));
Response.Clear();
<meta http-equiv="Expires" content="0">
<meta http-equiv="Cache-Control" content="no-cache">
<meta http-equiv="Pragma" content="no-cache">
这是我的服务器端 和浏览器端 代码,IE是可以了 但是 火狐怎么都不成功
在不需要缓存的页面中添加如下代码
Response.Cache.SetCacheability(System.Web.HttpCacheability.NoCache);
Response.Cache.SetNoStore();
首先要做如下声明:
<%@ OutputCache Location="None" VaryByParam="None" %>
后台程序:
Response.Cache.SetCacheability(HttpCacheability.NoCache);
看看这个有没有帮助
http://hi.baidu.com/cdefg198/blog/item/df7f0e18a038bd73dab4bd3e.html
http://www.iol.ie/~locka/mozilla/control.htm
http://www.experts-exchange.com/Programming/Languages/C_Sharp/Q_24501808.html