C#页面清除缓存
来源:互联网 发布:二手书店网站知乎 编辑:程序博客网 时间:2024/05/19 21:14
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#页面清除缓存
- 清除页面缓存
- 清除Tomcat页面缓存
- 清除页面缓存
- 清除jsp页面缓存
- .NET清除页面缓存
- 清除jsp页面缓存
- html页面清除缓存
- Java清除页面缓存
- jsp清除页面缓存
- 清除页面缓存
- jsp页面清除缓存
- jsp页面清除缓存
- JSP页面清除缓存
- 清除jsp页面缓存
- Html页面清除缓存
- inittab详解
- Android开发中的单元测试-初级教程(01)
- On GUI Architecture: GUI应用的若干问题和模式
- UIApplication keyWindow rootViewController 为 nil 的问题
- EQ管理的四步曲
- C#页面清除缓存
- Servlet
- Java和指针
- 【编程小工具】通过depends工具查看dll
- Word文件转PDF 文件时文字跳出流程图的问题【转】
- java中static关键字的详细解析
- CSDN--很好的网站
- ehCache与JRebel
- GSM网络结构图