I have a page that includes a 'Logout' button, when the user clicks 'Logout', I perform the Session.Abandon() and redirect to Login.aspx. This clears all my session variables fine.
But, if I then click the back button in the browser, the last page before clicking 'Logout' is rendered again. I believe this is due to caching. As when I includes the following code when loading the page, this problem will not occur.
Response.AddHeader("Cache-control", "no-store, must-revalidate, private,no-cache");
However, this piece of code will disable the cache for my page.
I do not want to disable cache for my pages because it slows down the performance considerably. I just want to find a way to clear the cache ONLY when the user clicks the 'Logout' menu item.
Can anyone help with this?