防止网页后退--禁止缓存

protected void Page_Load(object sender, EventArgs e)
{
    //防止网页后退--禁止缓存
    Response.Expires = 0;
    Response.Buffer = true;
    Response.ExpiresAbsolute = DateTime.Now.AddSeconds(-1);
    Response.AddHeader("pragma", "no-cache");
    Response.CacheControl = "no-cache";
}
posted @ 2009-02-23 14:10  郑希强  阅读(294)  评论(0编辑  收藏  举报