Set-Cookie: Expire property, clock skew and Internet Explorer issue

前端 未结 4 1549
北恋
北恋 2020-12-05 21:42

There is a header Max-Age that allows to specify the expiration time of a cookie. Unfortunately Internet Explorer 6, 7, 8 and probably later do not support Max-Age and requi

4条回答
  •  再見小時候
    2020-12-05 22:03

    If I had this sort of requirement I would manage the cookies in my application. Include a server-time expires timestamp in the content of the cookie, secure the cookie with encryption or a hash, and reject the cookie if the timestamp in the cookie has passed.

    This is pretty much how auto-login cookie expiration is enforced.

提交回复
热议问题