What conditions cause a web browser to display the "Page Expired" message?

Posted by RichardHowells on Stack Overflow See other posts from Stack Overflow or by RichardHowells
Published on 2010-06-11T10:56:38Z Indexed on 2010/06/11 11:02 UTC
Read the original article Hit count: 151

Filed under:
|
|
|

I assumed that sending a page out with an expiry (a la)...

    Response.Cache.SetExpires(System.DateTime.Now.AddSeconds(5));
    Response.Cache.SetCacheability(HttpCacheability.Public);
    Response.Cache.SetValidUntilExpires(true);

...would mean that if the user hit the back button they would see the expired page. It does not seem to work that way. I found that using the back button would simply show the old (IMO expired) page. In fact in experimenting with different combinations of caching/not caching and expiry times I NEVER managed to get the "Page Expired" message out of the browser.

What conditions provoke that message?

Server Environment ASP .Net. I've only tested in IE8 - I'm assuming that other browsers are consistent here.

© Stack Overflow or respective owner

Related posts about ASP.NET

Related posts about browser