File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Win a copy of
Java SE 8 for the Really Impatient
this week in the
Delete Records When user clicks close button of a browser
Joined: Aug 16, 2007
Oct 10, 2007 04:54:00
In my jsp page there is no logoff/signout button. But when user logins some data is stored in table. I want to delete that data when user closes browser directly by clicking close button of browser.
Joined: Nov 06, 2000
Oct 10, 2007 06:21:00
There is no direct way to capture that event on the backend. What if the browser crashes or the user never closes the browser?
Bosun (SCJP, SCWCD)
So much trouble in the world -- Bob Marley
Joined: Dec 11, 2004
Oct 10, 2007 07:33:00
What do have are session listeners which will fire events when the session is created or destroyed.
From your perspective, you shouldn't care why the session ends, you only care that the resources are cleaned up when it does.
How to ask a question...
Simple Servlet Examples
I agree. Here's the link:
subject: Delete Records When user clicks close button of a browser
Tracking the changes made in browser window
how to terminate session when closing the browser?
windows.close() stopped working. Why?
Need to capture browser close button in all browsers
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2014