Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Wanet Telecoms Ltd on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

history.back, history.go(), history.previous Difference???

Status
Not open for further replies.

Kateto

Programmer
Nov 10, 2001
1
GB
I would like to find out the difference between the three of them
 
history.back() and history.go(-1) are completely identical methods. Of course history.go() can take other parms including URL's or Page Titles while history.back() can only do one thing.

history.previous is a property and returns the URL of the previous item in the history object.
Code:
var lastURL = history.previous
However, this is a security issue and requires a signed script with explicit permission from the visitor to successfully use history.previous, .current, .next. Unlike the history.back() and history.go() methods, this one is not settable. It's only gettable.

ToddWW
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top