我的博客我做主,欢迎您来光临!

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)   客户端
       
<HEAD>
        <META HTTP-EQUIV="Pragma" CONTENT="no-cache">
        <META HTTP-EQUIV="Cache-Control" CONTENT="no-cache">
        <META HTTP-EQUIV="Expires" CONTENT="0">
        </HEAD>

posted on 2010-03-24 10:33  袁克雄  阅读(289)  评论(0编辑  收藏  举报