Write procedure at the browse closing

  • Thread starter Thread starter Riky
  • Start date Start date
R

Riky

hi,
i have a web application. I just want whenever any user close the
browser then that time application check whether that user properly
logged out or not. If the user does not logout property then browser
should not be closed. For this what should i do.
 
You can't detect when the user closes their browser. You are notified when
the session times out though. Look at the Session's End event.
 
You can use client-side window unload event to take some actions on client
side. Although you cannot cancel the event, you can alert the user or run
some other meaningful code.

Yes, but you'd need to do that on *every* page in your site, and the code
would fire every time the user navigated from page to page, not just when
the browser was closed...
 
Back
Top