This week's book giveaway is in the OCAJP 8 forum.
We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line!
See this thread for details.
The moose likes HTML, CSS and JavaScript and the fly likes Click on back button problem Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of OCA Java SE 8 Programmer I Study Guide this week in the OCAJP 8 forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "Click on back button problem" Watch "Click on back button problem" New topic

Click on back button problem

JayaSiji Gopal
Ranch Hand

Joined: Sep 27, 2004
Posts: 303
I have a jsp page, with two links:

Back - On this link, i have the history.back(-1) function.

If a user clicks on 'Help' and then clicks on 'Back', the control goes back to the Help page, instead of the previous jsp page.

Requirement is If the user clicks on 'Back', after clicking on 'Help', how can i clear the help page from the memory, to take the user back to the previous jsp page.

Any ideas!

SCJP 1.4, SCWCD 1.4<br /> <br />Thanks in advance!<br />Jayashree.
Bear Bibeault
Author and ninkuma

Joined: Jan 10, 2002
Posts: 63353

Rather than relying on hacks like history.back, your web app should create true links with complete URLs for all navigable items.

[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
I agree. Here's the link:
subject: Click on back button problem
jQuery in Action, 3rd edition