it's not necessarily a good idea to clear a session when the user close the browser window
imagine the user has many windows opened over the same website
if you invalidate the session by closing one of the windows, this means the user will have to log to the website once again when he switches to the next windows, to reinitialize his session
Thank you very much ,
In my application for each login i am using different sessions.
In one login if a user navigating then there is no chance of opening different windows.
So when the user without clicking logout button , if he closes the window by clicking 'x' , then the session allocated for this login is retaining until the session time out.
so i want to invalidate the session for this particular login .
Thank you,
Sudheendra.