In your case the most correct way (without gambiarras) is to use the event "Session_onend" of the global file.asa. On the login page create a session variable with the logged in user code (e.g., Session("Userid")) and in the Session_onend event of global.asa, if the session variable exists, update the database with the information that the respective user is no longer logged in. It is also interesting to define a Session.Timeout with the time you want each session to be available.
Note: This is the best solution if the user closes the page without clicking the button to unzip, but it will take a few minutes for the system to understand that the session is over and update the database. Then use it together with the solution you already use today, updating the database when the customer clicks to reload.
This link details your use of the global.asa archive events (in Portuguese): http://www.superasp.com.br/paginas_exibir_details.asp?dep=0,0&id=36
I hope I’ve helped!
If the electrical power falls, or stops the system and it is necessary to restart the machine by disconnecting it from the socket, Ajax is called?
– Sam