Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

After session invalidation should not be able to view secure pages by

Status
Not open for further replies.

roopan27

Programmer
Feb 17, 2004
8
US
Hi,
In my application, on clicking logoff button I have used
session.invalidate. But if I click the back button of the browser first it tells me that the page has expired and to click refresh. when I hit refresh, it gives dialog box that page requires resending of information retry or cancel,If I press retry it shows me the secure page.This shold not happen.Once I logoff if I click the back button it should not go back at all. how can I do this?
 
Hi,

You have to user JavaScript so that user cannot go back to the previous page once he clicks logoff.

Cheers,
Venu
 
Could you give me what code would be needed or point me to it? It would be a great help.
 
You cannot actually disable the back button unless your web page is a modal dialog, which is probably not what you want.

All you can do (via JavaScript) is do a history.forward() call to make the "back" pacge just dsplay the current, or other "forward" page. If you are unsure of how to do this, ask in the JavaScript forum.
 
Don't know if this would help, but i've got a similar system, although it's not as high level secure. What i do is on login store the loginid in a session variable. then on every page within the system, it checks if there is one, and if not returns to the login page. it's tedious but works. i also have frames, so i put this code on them, so if people bookmark my site it still returns them to the login screen.

i just used an if statement to check and then redirected the user to the login.

hope this helps
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top