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.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.