Pete Freitag Pete Freitag

Cookie Expires / Max-Age 1969-12-31T23:59:59.000Z


Have you ever noticed a cookie in Chrome Developer Tools showing a Expires / Max-Age value of 1969-12-31T23:59:59.000Z?

Such a cookie is known as a browser session cookie it will persist for as long as the browser is open. It is also refereed to a a browser in memory cookie (meaning that the browser doesn't persist the cookie value to disk).

Such a cookie may be preferable for security because it not written to disk. One thing to keep in mind is that the cookie could be in memory for quite some time if a user keeps their browser open for a long time.

If you omit the Expires value for a cookie, it will end up with the expiration date 1969-12-31T23:59:59.000Z in Chrome Developer Tools.

So why then does it have a value of 1969-12-31T23:59:59.000Z? Well the Unix timestamp epoch is Jan 1 1970 (the beginning of unix time), so a timestamp value of 0 is Jan 1st 1970. A value of -1 is 1969-12-31 one second before midnight.

Like this? Follow me ↯

Cookie Expires / Max-Age 1969-12-31T23:59:59.000Z was first published on January 24, 2019.

If you like reading about cookie, chrome, or security then you might also like:

Post a Comment