PHP-destroy-session-on-close-of-main-window

后端 未结 3 1558
遥遥无期
遥遥无期 2021-01-21 15:46

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

相关标签:
3条回答
  • 2021-01-21 16:16

    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

    0 讨论(0)
  • 2021-01-21 16:21

    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.

    0 讨论(0)
  • 2021-01-21 16:25

    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.

    0 讨论(0)
提交回复
热议问题