cookie有效期设为0,如果在意外情况(如断电,进程结束)后,打开原浏览器cookie依旧存在,再正常情况下关闭浏览器cookie是清除的啊。

WBOY
Release: 2016-06-20 12:35:56
Original
1640 people have browsed it

请看我的需求,求个思路。。。


回复讨论(解决方案)

cookie有效期设为0,如果在意外情况(如断电,进程结束)后,打开原浏览器cookie依旧存在
这个假设不存在!

只在 cookie有效期设大于当前时间,且离开了当前网站时,尚未失效的 cookie 变量才会写入缓冲区

cookie有效期设为0,如果在意外情况(如断电,进程结束)后,打开原浏览器cookie依旧存在
这个假设不存在!

只在 cookie有效期设大于当前时间,且离开了当前网站时,尚未失效的 cookie 变量才会写入缓冲区


那这有实现的办法吗?给 cookie设个有效果,能不能实现关浏览器就清楚cookie,意外情况则不清除?

有效期为 0 就不会被保存
并不存在意外情况

source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!