asp.net/html清理页面缓存的方法。

来源:互联网 发布:阿里云企业邮箱模式 编辑:程序博客网 时间:2024/06/08 00:02
 

   (1)   asp.net内

Response.Buffer = true;Response.ExpiresAbsolute = System.DateTime.Now.AddSeconds(-1);Response.Expires = 0;Response.CacheControl = "no-cache";Response.AddHeader("Pragma", "No-Cache");



    (2) HTML方法
          

 <HEAD> <META HTTP-EQUIV="Pragma" CONTENT="no-cache"> <META HTTP-EQUIV="Cache-Control" CONTENT="no-cache"> <META HTTP-EQUIV="Expires" CONTENT="0"> </HEAD>

 

    (3) 重新调用原页面的时候在给页面传一个参数:    href="****.ASPX?random()"

原创粉丝点击