Cookies not being updated on CF Pages when expires date is in the past

I noticed that something is wrong with my cookies. I can set or replace cookies without trouble both locally and on the production custom domain. but when I try to delete those cookies by setting the expires attribute to Thu, 01 Jan 1970 00:00:00 GMT and also set the domain and path exactly to what it says in devtools, the cookies just don’t get removed, the expiration date is not updated at all. while locally during dev testing it does remove them! how do I fix this?
1 Reply
jvh
jvh5mo ago
The only current fix I have found for this is not giving them an original expires date so they become Session cookies. This way they do get updated with the new expires date and disappear Aha, I found the fix. I didn't add domain= to the cookie so that it would just take the current domain itself. but i added domain=.domain.com now to it, note the dot before the hostname, and now it does work as intended!
Want results from more Discord servers?
Add your server