Chrome doesn't delete session cookies
P粉546179835
P粉546179835 2023-08-16 20:26:24
0
2
609
<p>I'm trying to set a session cookie in javascript, like this: </p> <pre class="brush:php;toolbar:false;">document.cookie = 'name=alex; path=/'</pre> <p>But even if I quit the browser and start it again, Chrome won't delete it. </p> <p> I checked in Firefox and Opera and both work as expected - they delete the session cookie when the browser exits. </p> <p>Did Chrome just ignore the expiration rule? </p> <p>I checked in multiple operating systems and found that session cookies are deleted in Chrome on Windows XP and Ubuntu, but not on Mac OSX Lion. </p>
P粉546179835
P粉546179835

reply all(2)
P粉654894952

I just ran into the same problem, a cookie was set to expire "at the end of the browsing session".

Unfortunately, it didn't expire, so I made some adjustments in my browser's settings.

It turns out that the ability to remember open tabs when the browser is closed is the source of the problem. (This feature is called "On startup" - "Continue where you were" on current versions of Chrome).

This problem also occurs in Opera and Firefox.

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!