python - Flask - How to get a cookie expiration time? -
i'd know how can expiration time of flask cookie. setting it, have following code:
resp.set_cookie('id', my_id expires = current_time + current_time + datetime.timedelta(days=30)) however, having difficulties getting value back.
i think cannot, according microsoft's explanation of how ordinary browsers work.
the browser responsible managing cookies, , cookie's expiration time , date browser manage store of cookies. therefore, although can read name , value of cookie, cannot read cookie's expiration date , time
https://msdn.microsoft.com/en-us/library/ms178194(v=vs.100).aspx
a question "how cookie's expire time" refers same problem, , way of putting expiration date cookie's value shown in 1 of answers.
Comments
Post a Comment