I've added the following code to my masterpage (Page_Load) so once a user logs out they will not be able to use the back button to see the page they were previously at.
Response.Buffer = true;
Response.ExpiresAbsolute = DateTime.Now.AddDays(-1);
Response.Expires = -1;
Response.CacheControl = "no-cache";
The problem is, my users want to be able to use the browser back button while they are logged into the application. When I comment the code out to not cache the pages they can use the back button, but once they logout they can use the back button to see the previous page they were on which causes a security risk.
Does anyone have any suggestions so they can use the browser back button in the application but once they are logged out they cannot go back into the application?