I have made a web application where the user will login and uses his account.
My problem is when he clicks on the back button and moves to login page and after that clicks on the forward page he automatically gets login without asking him for the username and password again.
Is there a way to make the user enter username and password again if he clicks on the back button and then forward?
Asked
Active
Viewed 785 times
0
ChrisM
- 505
- 6
- 18
-
2Why is this a problem? If they've logged in, going "back" shouldn't log them out. That's hideously bad from a user friendliness standpoint. – Marc B Jul 12 '12 at 11:07
-
When user cliks forward button it should check the authentication again. – Mdhar9e Jul 12 '12 at 11:09
1 Answers
1
This is completely a client side issue. When you press back button in browser, the browser loads the previous cached document.
For the functionality you want, You should have a javascript in login page which invokes logout.jsp whenever loaded first time or through back button.
Ramesh PVK
- 15,200
- 2
- 46
- 50