0

Am using 'window.onbeforeunload' to call an event when browser closing. But it works even when I am refreshing the page. I want to avoid this event when page refreshing, it needs to work only when I close the browser.

mplungjan
  • 169,008
  • 28
  • 173
  • 236
Rishad
  • 1
  • 2
  • check the answer given here http://stackoverflow.com/questions/3888902/javascript-detect-browser-close-tab-close-browser – Sandeeproop Mar 17 '15 at 09:27
  • 1: Please use a spell checker and check your spelling when you type. 2. please look around before asking - had you spelled onbeforeunload correctly, SO would have suggested many duplicates: http://stackoverflow.com/search?q=%5Bjavascript%5D+onbeforeunload+close – mplungjan Mar 17 '15 at 09:46

0 Answers0