ASP.net Webpage Still Displays Cached Versions

Possible duplicate:
IIS 7 Fresh Image Forms

My webpage still displays 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 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?

+3
source share
1 answer

Someday you need to reset your browser. If you use IE, the tool that helps is the IE toolbar for developers with Fiddler.

For firefox, use Firebug with Fiddler.

0
source

Source: https://habr.com/ru/post/1743882/


All Articles