在会话结束时或在特定时间过期cookie? [英] Expire cookie at end of session OR at specific time?

查看:560
本文介绍了在会话结束时或在特定时间过期cookie?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否有可能在会话结束时或在特定时间让Cookie过期?

Is it possible to have a cookie expire at the end of a session, or at a specific time?

推荐答案

这是不可能的单个cookie我发送两个cookie。 auth cookie在会话结束时到期。第二个cookie在特定时间到期。在每个请求中,我检查第二个cookie,如果它是null,我手动登录用户。

since this is not possible with a single cookie i am sending two cookies. the auth cookie expires at the end of the session. the second cookie expires at a specific time. on each request i check the second cookie and if it is null i log the user out manually.

这篇关于在会话结束时或在特定时间过期cookie?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆