Im trying to logout a user from my web application using the servlet code below.
and assigning the above servlet to a logout link, now the above works correctly ,But it would allow the person to be able to see a protected screen below to a particular user by clicking browser back button , even though any action after that forces the user to login . Is there any way I can prevent an unauthorised user from viewing protected content by hitting the back button of the browser?
Uh just as an update, I found a work around to the situation rather than implementing the client side script on all pages . I cleared the cache through a filter , and solved the problem . May help any one facing similar issues in the future