最佳答案
Unix 时间从 1970 年初开始,这意味着 -1
是 1969 年。如果期望值通常为正,那么这是“未知”的常用值。对于 cookie MaxAge 为负值意味着浏览器关闭后 cookie 就会过期:
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.
关于javascript - 过期日期为 1969 年的 cookie 是什么意思?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51497459/