ASP.net web page still displaying cached versions [duplicate]
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.
精彩评论