ITPub博客

首页 > Linux操作系统 > Linux操作系统 > ASP.NET清除页面缓存

ASP.NET清除页面缓存

原创 Linux操作系统 作者:iDotNetSpace 时间:2009-12-18 13:21:44 0 删除 编辑

ASP.NET清除页面缓存

    (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方法
       
       
       
       
       

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

来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/12639172/viewspace-622789/ ,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论

注册时间:2008-01-04

  • 博文量
    2376
  • 访问量
    5766165