开发者

session expiration

if I am logged in on my application but 开发者_如何学JAVAif i choose closing browser without clicking on logout how will be I logged out from server automatically?


Unless you have the user explicity log out, your server cannot know the user has closed their browser.

You can simply let sessions timeout naturally, for example, after ten minutes of inactivity.

Alternatively, you can add some js to the page to make regular pings back to the server to keep a session alive while the browser window is open.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜