Reputation: 11
I have developed a small application using Classic ASP and VBScript. It's currently running in my company. When a user clicks on log out, the session expires. I have put further controls in the database. When Log out is clicked, the user status changes to Signed Out in database. This prevents a user to click on any link even if he goes to the previous page by clicking the back button after logging out.
However, what I want is that after logging out, if the user clicks on Back button in browser, the previous page should not show up at all. Rather a default error message which I decide should show up. Is there any way in Classic ASP to accomplish this?
Upvotes: 1
Views: 2329
Reputation: 4126
What I have been using for years to prevent caching is the following (place it in a separate file and include on each front-end asp page)
<%
Response.Expires = 60
Response.Expiresabsolute = Now() - 1
Response.AddHeader "pragma","no-cache"
Response.AddHeader "cache-control","private"
Response.CacheControl = "no-cache"
%>
Other than that I that you should use session.abandon on your log off page and
then you can use Session_OnStart with a redirect to your default launch page.
Or if you really want that error page, a Session.clear and function to redirect to that error page if the session has been cleared.
Upvotes: 2