A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Win a copy of
REST with Spring (video course)
this week in the
Delete Records When user clicks close button of a browser
Joined: Aug 16, 2007
Oct 10, 2007 04:54:00
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
windows.close() stopped working. Why?
how to terminate session when closing the browser?
Need to capture browser close button in all browsers
Tracking the changes made in browser window
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2015