Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

back button problem  RSS feed

 
sihani rani
Ranch Hand
Posts: 32
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


1)i have one login page.user enter name and password

and click submit..

2)when submit button click,session will be created.
name and pass word set attribute to session

3)after logout i click browser back button,it display the
previous page

i am also using the following code for session closing in my logout.jsp
but it is not working..






i am also using the following javascript code to disable back button in my login.jsp
but it is not working..








iam using browser IE6.0 and mozila3.6 ..

it also not working in eclipse browser

please reply me..
thanks in advance
 
Seetharaman Venkatasamy
Ranch Hand
Posts: 5575
Eclipse IDE Java Windows XP
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Once I done this.

--> dont use java script for disabling back button.

--> clear browser cache.[you have that]

--> use PRG technique[if you dont know , search in javaranch]

--> if browser dont cache and user click back button then it request on server side, now you check session and redirect him to the same last page or login page.

<edit>response.setHeader("Cache-Control", "no-store, no-cache, must-revalidate"); I remember[but not sure] , here dont use no-store, it give problem in IE or Mozilla[reason dont know]... just check...</edit>

hth
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!