File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes HTML, CSS and JavaScript and the fly likes javascript: history.back() Vs history.go(-1) Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Make it so: Java DB Connections & Transactions this week in the JDBC forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "javascript: history.back() Vs history.go(-1)" Watch "javascript: history.back() Vs history.go(-1)" New topic

javascript: history.back() Vs history.go(-1)

Ramna Reddy
Ranch Hand

Joined: Aug 06, 2006
Posts: 96
Hi Ranchers,
Is there any diffrence between javascript: history.back() and history.go(-1)

Thank you in advance,
Eric Pascarello

Joined: Nov 08, 2001
Posts: 15385
I do not think there is any difference bewteen them.

I perfer go since it is one less keystroke

I agree. Here's the link:
subject: javascript: history.back() Vs history.go(-1)
It's not a secret anymore!