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

后端 未结 3 1596
遥遥无期
遥遥无期 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: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.

提交回复
热议问题