Cookie without expiration time doesn't deletes with browser restart
-
I don't found any specifications about this, but there written on w3schools.com: "You can also add an expiry date (in UTC time). By default, the cookie is deleted when the browser is closed" (same on learn.javascript.ru in Russian language) that cookies that was set without expires and max-age options should automaticaly delete after browser restart. Chrome and Firefox browsers works exactly like that, but in Vivaldi such cookies doesn't deletes.
Steps to reproduce:
- Open development console
- Type: document.cookie = "MyTempCookie=Test"
- Restart browser
- Open web-site for which you saved that cookie and console again
- Type in console: document.cookie
"MyTempCookie=Test" cookie will be in list. But expected that is should be deleted after restart (as session cookie).
-
@AlexeyB Hi - I can't reproduce that here. A cookie set to session only is deleted on browser close.
Video: https://ttm.sh/qEc.mp4
How are you restarting Vivaldi?
Are you sure you're shutting down all Vivaldi windows? -
@AlexeyB If you start Vivaldi with settings Last Session such cookies with session lifetime get not removed. They are deleted if you do not start with Last Session.
In 2018 a dev said:
Looking closer, it seems to be expected behavior when Vivaldi is configured to Startup with Last Session.
For other startup options session cookies are cleared properly.
Chromium behaves similarly, just default startup options are different.https://bugs.chromium.org/p/chromium/issues/detail?id=128513
-
@DoctorG Thanks for the explanation. Strange, I can reproduce the "issue" in Chrome 104 as well. But not in Chromium 104...
-
@DoctorG Thanks.
-
@Pathduck said in Cookie without expiration time doesn't deletes with browser restart:
But not in Chromium 104
Foe me with Chromium 104.0.5112.81 from Woolyss after restart stating with new tab, the session cookie was removed, checked for domain at chrome://settings/siteData
-
️ Not a bug, seems to be a Chromium feature since years for better login after restart.
-
@DoctorG said in Cookie without expiration time doesn't deletes with browser restart:
Chromium 104.0.5112.81 from Woolyss after restart stating with new tab, the session cookie was removed, checked for domain at chrome://settings/siteData
Yeah, that's the version I have too. That's what I meant was a bit strange - Chrome kept the cookie after restart, Chromium deleted it. So different behaviour in Chromium and Chrome...
-
@Pathduck said in Cookie without expiration time doesn't deletes with browser restart:
Chrome kept the cookie after restart
Googled Chrome is not Chromium as you see. Bad, but true.
For me Chrome is not for daily use on my office PC, only on one workstation for testing in a innocent Linux VM.
-
-
@Pathduck said in Cookie without expiration time doesn't deletes with browser restart:
(I'm missing the green one though...)
Only for Vivaldi Doctors and Forensics
-
@Pathduck said in Cookie without expiration time doesn't deletes with browser restart:
Chrome kept the cookie after restart, Chromium deleted it. So different behaviour in Chromium and Chrome...
For me Chrome deletes session cookies after restart when there chosen startup with new tab in settings.
Tested on: Chrome 104.0.5112.81 (x64), Windows 7 (x64) -
@AlexeyB Yes, exactly, but with setting "Continue where you left off" Chrome also preserves session cookies. Just like Vivaldi does with "Last Session" setting.
Apparently, according to the Chromium bug report linked above, this is to avoid users getting logged out when using sessions and closing the browser, expecting it to keep its state after restart.