How can i perform some action at time of TAB close in a browser in my ASP.NET website?
I am developing an ASP.NET MVC application using C#. How can i check if a user has closed the browser TAB? I have checked beforeunload and unload function. Is this the best way to check? Any other suggestion? I want to log out user if he closes the TAB.