2
Answers

How to call a function on Browser Close or Tab Close button

I need to perform some DB operation when  Browser Close or Tab Close button is clicked.
 
If I use onbeforeunload  event then its working but the problem is when I clicked Browser Reload button the event is also firing.
 
So how to identify which browser button is clicked and how to perform this operation.
Answers (2)