use this code to prvent the page from being cached..
private void Page_Load(object sender, System.EventArgs e)
{
ExpirePageCache();
//.......rest of the page_load logic....................
}
/// <summary>
/// This function prevent the page being retrieved from broswer cache
/// </summary>
private void ExpirePageCache()
{
Response.Cache.SetCacheability(HttpCacheability.No Cache);
Response.Cache.SetExpires(DateTime.Now-new TimeSpan(1,0,0));
Response.Cache.SetLastModified(DateTime.Now);
Response.Cache.SetAllowResponseInBrowserHistory(fa lse);
}
"PJ6" wrote:
After logging out of my test site I would like to be able to not allow the
user to navigate back to previous pages. It's not super-important because if
they try to do anything the login state has been wiped and anything that
posts back or refreshes the page will send them back to the login screen...
but it would be nice if either the navigation history is wiped, or some
setting is set that causes all the previous content to be expired. Is that
possible?
Paul