I am using MVC for my project and my problem is like this:
I would like to have the user redirected to login page when clicking 'back' button after logging out.
I am aware that clicking back button will give the user a copy of the previous page stored in the browser's cache.
So what I did:-
Is there any way that when a user logs out and tries to go to a 'cached page' through the 'Back' button be routed to the login page first?
Swastik Dey wrote:When the user loggs in you may store the userinfo in a session scoped variable, and the user loggs out you can remove this attribute from session. Now, when the user navigates to any page, you can check whether you have user info in session scope or else redirect the user to login page. This is my though there can always be better options.
yes I did the same
and in logout
and put below code in each jsp page
- X 2
when your children are suffering from your punishment, tell your them it will help them write good poetry when they are older. Like this tiny ad:
ScroogeXHTML 7.1 - RTF to HTML5 / XHTML converterhttps://coderanch.com/t/690611/ScroogeXHTML-RTF-HTML-XHTML-converter