Invalidating session on browser close

However capturing browser closure event is not a good idea to invalidate a user session.

What can be an alternative solution to invalidate a user session on browser closure ?

Session (in)validation is usually a server concept: a session is "valid" as long as the server considers it to be valid, i.e.

invalidating session on browser close-73invalidating session on browser close-43

boyfriend dating married - Invalidating session on browser close

quote: Originally posted by Vinod Tewthia hi--- in my web-application i am keeping track of logged users and their current session (without cookies) in some datastructure and remove the corospondig record form this datastructure when user logged off properly, but!

And you can implement onunload() in the jsp page and call a java script method and use iframes to send a request to a servlet which will invalidate the session.

Have a look at the following discussions on this topic. EID=34927 ID=537660 Hope it gives you usefull information.

I have a web application where web session need to expire after stipulated period of time.

You are currently viewing the Pro JSP section of the Wrox Programmer to Programmer discussions.

This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. By joining today you can post your own programming questions, respond to other developers questions, and eliminate the ads that are displayed to guests.Registration is fast, simple and absolutely free .hi--- in my web-application i am keeping track of logged users and their current session (without cookies) in some datastructure and remove the corospondig record form this datastructure when user logged off properly, but!when user's browser craches or colse unexpectedly then what is the correct way to invalidate the session instead waiting for time-out of session?What is usually done is: From your question, I suppose that you would like the browser "closure" to act like a logout button.If you can capture a closure event, then that's good. two minutes) and have some Javascript running in the background of the page to do some regular hidden "keep-alive" activity with the server (e.g.every 90 seconds) as long as the corresponding tab/window is open.

Comments are closed.