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!
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