I want my application to execute some code when the browser is closed. My problem is beforeunload event that is called on both the browser close button and tab close. I don't need that code to be executed on tab close. Is there any way that we can execute that code on browser close not on tab close?
I have tried beforeunload event that is calling on browser close and tab close. I need to separate these close calls so that the same code shouldn't be executed on for browser close and tab close.