import * as Cookie from 'js-cookie';
Cookie.set('session', 'test');
// cookies created
// close browser
// open browser, cookie exists
According to docs
expires
Define when the cookie will be removed. Value can be a Number which will be interpreted as days from time of creation or a Date instance. If omitted, the cookie becomes a session cookie.
Cookie set once when form submitted, so after browser reopen it will not be set. Is this expected behaviour?
This is not expected behavior. Could you let us know which browser youâre using, whether you observe the same behavior in a different browser, and which extensions youâre using?
I encounter the issue too, using chrome 70.
I found this: https://stackoverflow.com/questions/10617954/chrome-doesnt-delete-session-cookies
Do you have âContinue where I left offâ activated?
I found this: https://stackoverflow.com/questions/10617954/chrome-doesnt-delete-session-cookies
Do you have âContinue where I left offâ activated?
So that explains it. Thx!
Yes, âContinue where I left offâ is enabled in my browser Google Chrome 70.
So Chrome still keeps the cookie for the âContinue where I left offâ functionality? I have probably seen this in the past but we never documented it. Is it worth documenting this problem in the README @BonBonSlick @jakiefeng @carhartl?
I'll close for now but if it's worth documenting something we can reopen đ
I think yes, it should be documented, or mentioned to avoid future questions like this.
Done: https://github.com/js-cookie/js-cookie/wiki/Frequently-Asked-Questions#why-the-browser-does-not-remove-the-cookies-after-i-close-it
Most helpful comment
Done: https://github.com/js-cookie/js-cookie/wiki/Frequently-Asked-Questions#why-the-browser-does-not-remove-the-cookies-after-i-close-it