Rakesh Tripathy

Rakesh Tripathy

  • NA
  • 18
  • 13.2k

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

Oct 29 2018 11:24 PM
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)