| Author |
server to be notified when browser closes
|
mohan kumar nie
Greenhorn
Joined: Feb 05, 2002
Posts: 12
|
|
when user closes the browser, I want server to be notified. If I use <BODY onUnLoad="javascript:notifyServer()"> , this will be called everytime when user request for another page. How to achieve above functionality in Microsoft Internet explorer.
|
 |
prabhat kumar
Ranch Hand
Joined: Apr 11, 2001
Posts: 114
|
|
|
check for window.closed property of window object
|
 |
Jessica Sant
Sheriff
Joined: Oct 17, 2001
Posts: 4313
|
|
This is one of the most often asked questions in the forum... Do a search and you should be able to find more info. The main point is that you can't be guaranteed that your server will be notified everytime a browser is closed, so don't count on it.
|
- Jess
Blog:KnitClimbJava | Twitter: jsant | Ravelry: wingedsheep
|
 |
prabhat kumar
Ranch Hand
Joined: Apr 11, 2001
Posts: 114
|
|
|
what u really want to do by knowing the browser closing?
|
 |
Dale DeMott
Ranch Hand
Joined: Nov 02, 2000
Posts: 514
|
|
You don't know when the user closes the browser. This is why you have a session timeout. There is no way to tell from the server side if the user has already left or not until the session has timed out. -Dale
|
By failing to prepare, you are preparing to fail.<br />Benjamin Franklin (1706 - 1790)
|
 |
 |
|
|
subject: server to be notified when browser closes
|
|
|