JavaScript 'Back' Button
The usual approach to a "Back" button on a Web page it to provide an
absolute link back to the page the user would have come from, if they had
followed your links to the page. The buttons on the bottom of
this page are typical examples.
This approach assumes that you know where from the user came from and you intend sending them 'back' to that point. The problem is, they may not have come from where you think they did. This is a particular problem if you have several links on your site pointing to the same page. You can't be sure which page the user came from.
A better approach is to use a 'relative' back button that uses the Browser "history" information to return the user to where they actually came from. The script is:
<a href="javascript:history.back();"><font face="Arial" color="#000080"> <img border="0" src="../back.gif" width="71" height="32"></font></a> |
The script above produces ...
In this example an image of an
actual button is used
<- Back - Menu