How can a cookie expire in 1969?
What does this mean?
Thanks,
But as long as it doesn't smell funky (the oils in the cookie may go bad over a long period of time) and it doesn't crumble apart in your hand, then it's okay to eat.
WHAT IS A COOKIE? A cookie is a small snippet of text that a website asks your browser to store. All cookies have expiration dates in them that determine how long they stay in your browser. Cookies can be removed in two ways: automatically, when they expire, or when you manually delete them.
If you are using Chrome you can goto the "Resources" tab and find the item "Cookies" in the left sidebar. From there select the domain you are checking the set cookie for and it will give you a list of cookies associated with that domain, along with their expiration date.
Persistent cookie Persistent cookies are not deleted by the browser when the user closes it. These cookies have an expiration date that you can set in your server.
Unix time was started at the beginning of 1970, that means that -1
is in 1969. And that is a commonly used value for "unknown" if the expected value is usually positive. And for cookies MaxAge with a negative value means that the cookie expires as soon as the browser gets closed:
Relevant section of the spec:
5.2.2 [..] If delta-seconds is less than or equal to zero (0), let expiry-time be the earliest representable date and time. Otherwise, let the expiry-time be the current date and time plus delta-seconds seconds.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With