Warning: Page has Expired

windows

Guest
Hi,

I was wondering how to make a page expire in order to prevent the page to display when clicking the browser back-button. I would like to apply it to a log-out page: once a user has logged out, he won't be able to return to the previous page without loging in again.
I am using asp on IIS5 and most my code is written in javascript not vbscript.

Thanks,
CorneliusYou have to use session variables. You can set the session when the user logs in and when they log out you can get rid of it. The good thing about this as that session variables only last for a certain amount of inactive time so if they leave their computer for a while when they go to use it again, they will have to login again.

I use Vbscript myself but if you want some help just give me a shout.Thanks for your reply,

I am using session variables to store the memberID, however, when using the browser back-button, it just displays the page previously loaded without requesting it from the server (even the form fields which where filled in on the prior page will still display their content).

Thanks,
CorneliusWhen the back/forward button is clicked, the page is pulled from the local cache, not from the internet. I don't think you can do anything about that (cookies maybe?) but maybe someone will know differently.

Regards,
KevinThe only solution I can think of is if the page the people were clicking back to refreshed. If anyone knows how you can make a page refresh straight away and once only (which is the bit I don't know) then I reckon you could solve this problem.Kevin,
This forum site does exactly what I am looking for: when you submit a post and click the back-button (once you are past the redirect page), it will display "Warning: Page has Expired".
If anyone knows how this particular page on this forum is set up, I would love to know.

Thanks everyone for your input!
CorneliusTHis is just a test......If you click the back button again, after you get the expired page message, you will return to the form, and it will still be filled in (at least it is on my PC).

If you add a redirection page you should get the page expired warning, I believe that is a security feature of web browses. It is not a feature of this messsage board.

Regards,
Kevinusing location.replace="http://whatever"

will replace the current location with the form "tanks for filling me out" and not allow the user to hit 'back' to edit info.

The 'page has expired" is an IE feature.
 
Top