简体   繁体   English

浏览器cookie过期处理

[英]Browser cookie expire handling

Is there a function that can be triggered in javascript once a session cookie expires? 会话Cookie过期后,是否可以使用javascript触发功能? Or do I have to have a set timeout function in javascript that checks the existence of a cookie. 还是我必须在javascript中设置超时功能来检查cookie的存在。

There is no way to know when a cookie expires , so i guess there is no function which does what you are asking . 没有办法知道Cookie何时过期,所以我想没有功能可以满足您的要求。 The best way is to check the existence , as you said. 如您所说,最好的方法是检查是否存在。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM