I've been crazy thinking about how to solve this problem updating mysql when browser is close. I have a login in my web application when users logs in and status=1(online) then status=0(offline) when they logout.
Is there any proper or best practice to handle this situation? Any solution would be appreciated. Thank you.