Is there a function like in php like this javascript function:
history.back();

If a user access one of my pages, I want a link back to his exact previous page. So if the user comes from:

thread.php?threadid=3

the link back has to be "thread.php?threadid=3"

any ideas?