Java Forum

Ask Question   UnAnswered
Home » Forum » Java       RSS Feeds

how I can detect the "back button on browser

  Asked By: Don    Date: Nov 02    Category: Java    Views: 2371

does every one know , how I can detect the "back button on browser" event , and navigate to "page not found - 404 error" jsp , every time user click on back button . my UI is struts , is there any java script or server side control on Action mapping for that?

as I searched there is no way to cath that event :( how can I detect it pushed?



2 Answers Found

Answer #1    Answered By: Felicia Hill     Answered On: Nov 02

u can disable back  button but u cant detect  .
But struts framework has a design which is token based and can be used to detect if the user has used back button  . its simple to implement .

Answer #2    Answered By: Corinne Rogers     Answered On: Nov 02

As I know you can achieve this using the java script. I guess following links would help you for finding the solution for this question.

Didn't find what you were looking for? Find more on how I can detect the "back button on browser Or get search suggestion and latest updates.