开发者

ASP.net web page still displaying cached versions [duplicate]

This question already has answers here: Closed 10 years ago.

Possible Duplicate:

IIS 7 Force Fresh Images

My web page is开发者_开发百科 still displaying a previously cached versions of the page.

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);

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?


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

For firefox use Firebug with Fiddler.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜