As far I know this is not possible ... the best you could get would be
to use the window_onunload event on the browser to trigger something on
the server using say a document.location in clientside Javascript to direct
to a server page that just registers that the browser has closed.
This is still not fool proof since the window_onunload is not always
guaranteed (e.g. if network goes down, or client crashes etc)
Remember that HTTP is stateless and there is no communication between
the client and server unless the client makes a request.
Cheers,
Jonathan
-----Original Message-----
From: Ionel Condor [mailto:[EMAIL PROTECTED]]
Sent: 10 July, 2000 8:22 AM
To: [EMAIL PROTECTED]
Subject: how to detect a browser closing
Hi,
I have the following problem:
I want to detect on the server side when a user (which has an open
session on the server) has closed his browser by pressing the "X" close
button of the window.
I know that using http sessions is probably the unique way, but I don't
know how, as I
don't know if the server can't initiate by itself such a check ?
Many thanks for any suggestions,
Ionel C.
===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
JSP-INTEREST".
Some relevant FAQs on JSP/Servlets can be found at:
http://java.sun.com/products/jsp/faq.html
http://www.esperanto.org.nz/jsp/jspfaq.html
http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
Some relevant FAQs on JSP/Servlets can be found at:
http://java.sun.com/products/jsp/faq.html
http://www.esperanto.org.nz/jsp/jspfaq.html
http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets