I'm on NodeJS, Express app i am using cookies for some features of my app. I need to set cookie life to one month.
For this very purpose i've set cookie maxAge to days*hoursPerDay*minutesPerHour*secondsPerMinute*1000
to achieve one month time 30*24*60*60*1000
= 2592000000
.
Yet in browser expiry of my cookies is near 10 hours.
What am i missing, my calculations are wrong? or I am using wrong attribute(maxAge
)?
Also what is the difference between maxAge
and expiry
attribute of cookies?
maxAge
is probably a convenience wrapper.