How to: do something on the server when user close the browser?

F

Feng

Hi,

What I need is to run some ASP code on the server, when
user close his/her browser. I tried to create a "OnUnload"
event handler on client side JavaScript to do a "Submit
()". But that doesn't seem to help.

Can someone help me on this?

Thanks
 
A

AW

Hi Feng,

You may want to use the Session_End event, which happen some time after the
user closes his/her browser (after the timeout, which has a default of 20
minutes).

If not, you may use a javascript as you guessed, but you would instead have
it to open another window that would call an url on you site to tell that
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

Forum statistics

Threads
473,755
Messages
2,569,535
Members
45,007
Latest member
obedient dusk

Latest Threads

Top