How to destroy the session on closing the browser When browser window is closed, session should be terminated. Right now, if I close the window and type the application url, it
Fixed.
With below settings "application" session expires during browser close.
Firefox Browser->Tools->Options->General Tab StartUp: When Firefox starts: Show a blank page
Firefox Browser->Tools->Options->Privacy Tab History: Firefox will Use custom settings for history / Never remember history Cookie: Keep Until : I close firefox
It doesn't really seem like altering your browser settings is an appropriate method for achieving this solution as it would only then work for users with said browser settings in place.
Native php sessions well expire on browser close. As long as you are not modifying the session cookie expiration time you should be fine.
If this is not happening then I am going to guess you are using a framework that is changing the php defaults or your php configuration has been changed.