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 Back button Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "Javascript Back button" Watch "Javascript Back button" New topic

Javascript Back button

Muhammad Sarwar

Joined: Jan 02, 2003
Posts: 20
Hi All,

Is there any way in javascript to detect that the back button of browser has been pressed.
Actually I want to refresh my page whenever someone press the browser back button


Knowlege 4 evey 1
Eric Pascarello

Joined: Nov 08, 2001
Posts: 15385
There is no way to tell the difference bewteen the back button, the closing of the page, user navigating away, or the refresh button.

I agree. Here's the link:
subject: Javascript Back button
It's not a secret anymore!