Write procedure at the browse closing

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.
 
A

Aidy

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.
 
M

Mark Rae

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...
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,432
Messages
2,571,681
Members
48,796
Latest member
Greg L.

Latest Threads

Top