Friday, January 13, 2012

Can we capture the same browser closing event without using “onunload”


Actually using the window.close , we can control whether browser is closed or not, but it works only for pop-ups created by the browser.



So, are there any ways to listen to the closing event of the browser without using onunload ? Because we don't want things to be executed when back , refresh or forward actions occur.



Please also reply if you know specifics regarding Firefox.



Thanks in advance!

1 comment:

  1. You are trying to manipulate the EXPECTED behaviour of the browser, essentially taking away people's ability to navigate. Fortunately browser developers were smart enough to disallow this - so the answer is NO.

    ReplyDelete