Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

how to access browser refresh button

 
Ravi Goli
Ranch Hand
Posts: 31
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 15385
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There is no real way to determine if the browser is refreshed.

Eric
 
Ravi Goli
Ranch Hand
Posts: 31
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Pie
Posts: 64683
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There is no event to detect.
 
Ravi Goli
Ranch Hand
Posts: 31
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic