• Post Reply Bookmark Topic Watch Topic
  • New Topic

Back Button allows to show the looged out page

 
Pradeep Eriya
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hello..,
I developed a project in JSP that allows users to Sign up as well as logg in.
I used session object and is working properly.
But even though a user logged out successfully, the Back Button of the browser allows to show the page that should be displayed only on the proper logging in. Please provide a simple solution.
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You're most likely looking at the cached version in the browser.

There are two FAQ entries in our JSP FAQ that will help here.
See:
http://faq.javaranch.com/java/NoCacheHeaders

and:
http://faq.javaranch.com/java/PostRedirectGet

The first shows how to request that the browser not cache your pages.
The second shows how to prevent a duplicate post from being sent when you either refresh or back into a page.

The combination of these two things should prevent the problem that you are currently experiencing.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!