php - Cookie expiration is browser specific or server specific? -
i setting a cookie expiration time
mktime(24,0,0).
my question simple. if browsers timezone different , cookie follow server's timezone expire or browser's timezone ?
the set-cookie
header has timezone information part of expires datetime user agent knows when should expire.
set-cookie: sessiontoken=abc123; expires=wed, 09 jun 2021 10:18:14 gmt
from php docs setcookie
expire
...
note: may notice expire parameter takes on unix timestamp, opposed date format wdy, dd-mon-yyyy hh:mm:ss gmt, because php conversion internally.
Comments
Post a Comment