aspose file tools*
The moose likes HTML, CSS and JavaScript and the fly likes how to access browser refresh 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 "how to access browser refresh button" Watch "how to access browser refresh button" New topic
Author

how to access browser refresh button

Ravi Goli
Ranch Hand

Joined: Feb 13, 2005
Posts: 31
Hi all,

I got to check for the browser refresh action and delete some set cookies.
How to check a click on the browser refresh button in javascript.

I cannot use another custom refresh button.

Thanks much,
Ravi.
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6
There is no real way to determine if the browser is refreshed.

Eric
Ravi Goli
Ranch Hand

Joined: Feb 13, 2005
Posts: 31
Hi,

Thanks Eric for the reply.

I've seen sources on internet saying that we can disable the Browser Refresh when refresh is tried using F5 key or when tried by selecting the refresh option from the right click on the page.

But couldn't get a source describing how to access the event resulting from a click on Refresh.

I was thinking we could access every event on the page using DOM or javascript.

umh...still hoping to find a way to access the browser refresh event or click.

Else could someone suggest a way to get my cookies deleted only on a page refresh.

Thanks,
Ravi.
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60057
    
  65

There is no event to detect.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Ravi Goli
Ranch Hand

Joined: Feb 13, 2005
Posts: 31
Hi Bear,

Thanks for the reply.

I got the problem I was working on fixed.
I had problem in using the path the correct way for the javascript cookies.
I was able to read a cookie from a page different from the one it was created without specifying the path for it, so while deleting it was not specifying the path, but finally got the deletion working by specifying the path.

Ravi.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: how to access browser refresh button
 
Similar Threads
Browser Refresh
html form refresh
Overriding Browser refresh button
how to invalidate session when browser refreshed or backward pressed
Disabling Back and Refresh/Reload button.