When I close the browser window from the task bar the session is not getting destroyed. I could handle this on closing the browser using close(X) button or by pressing Alt+F4 using javascript. But from the task bar if I close the window how can I clear the session? The problem occurs only when there is another browser window already opened before closing the current window. When I go access the application it will directly go to the page previously accessed as the session is still valid. 

Any help appreciated.