add_header Set-Cookie The difference between Max-Age and Expires

c0nw0nk nginx-forum at forum.nginx.org
Fri Sep 9 07:01:39 UTC 2016


So i read that IE8 and older browsers do not support "Max-Age" inside of
set-cookie headers. (but all browsers and modern support expires)

add_header Set-Cookie
"value=1;Domain=.networkflare.com;Path=/;Max-Age=2592000"; #+1 month 30
days

Apprently they support "expires" though so i changed the above to the
following but now the cookie says it will expire at end of every session.

add_header Set-Cookie
"value=1;Domain=.networkflare.com;Path=/;expires=2592000"; #+1 month 30
days

how can i tell this to expire 1 month into the future all the examples i
find mean i have to set a date manually what would mean restarting and
editing my config constantly. (automated would be nice)

Posted at Nginx Forum: https://forum.nginx.org/read.php?2,269438,269438#msg-269438



More information about the nginx mailing list