C#清除页面缓存
2009-08-11 11:39
399 查看
C#清除页面缓存
private void SetPageNoCache()
{
Response.Buffer = true;
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方法
<meta http-equiv="Pragma" content="no-cache">
<meta http-equiv="Cache-Control" content="no-cache">
<meta http-equiv="Expires" content="0">
(3) 重新调用原页面的时候在给页面传一个参数: href="****.aspx?random()"
相关文章推荐
- C#清除页面缓存
- C#清除页面缓存
- C#页面清除缓存
- jsp页面清除缓存代码
- 如何清除页面的图片缓存
- 学习:ASP.NET清除页面缓存(转)
- asp.net 页面清除缓存
- C#清除缓存、清除IE临时文件缓存cookies的方法
- Php laravel 5 清除页面 view 缓存
- c# webbrowser 清除cookie和缓存
- 清除页面缓存
- 页面缓存清除的方法
- JSP清除页面缓存常用方法小结
- JSP清除页面缓存常用方法小结
- C# 通过调用Win32 API函数清除浏览器缓存和cookie
- ASP.NET几种清除页面缓存的方法
- Html页面清除缓存
- 设置清除html5页面缓存
- 清除页面缓存
- ASP.NET清除页面缓存