ASP.net网页仍然显示缓存版本 [英] ASP.net web page still displaying cached versions

查看:176
本文介绍了ASP.net网页仍然显示缓存版本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

可能重复:
   IIS 7组新鲜的图片

我的网页仍显示$ P $页面pviously缓存版本。

My web page is still displaying a previously cached versions of the page.

我有这个在Page_Load事件:

I have this in the page_load event:

    Response.Clear();
    Response.Buffer = true;
    Response.ExpiresAbsolute = DateTime.Now.AddDays(-1d);
    Response.Expires = -1;
    Response.CacheControl = "no-cache";
    Response.Cache.SetCacheability(HttpCacheability.NoCache);

我有这样的Page_Init:

I have this in the Page_Init:

protected void Page_Init(object Sender, EventArgs e)
{
    Response.Cache.SetCacheability(HttpCacheability.NoCache);
    Response.Cache.SetExpires(DateTime.Now.AddDays(-1));
}

任何想法,我可能会丢失?

Any idea what I might be missing?

推荐答案

有时你需要刷新浏览器。如果你使用IE浏览器,这有助于该工具是IE浏览器工具栏的开发与小提琴手。

Sometime you need to flush the browser. If you use IE, the tool that helps is the IE Toolbar for Developers with Fiddler.

对于Firefox使用Firebug使用Fiddler。

For firefox use Firebug with Fiddler.

这篇关于ASP.net网页仍然显示缓存版本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆