I tried to increase the cookie expiry time and activated sliding expiry.
But the cookie expiry is still "N/A"
what problems will it cause, why expiry is not shown. In this case what will happen to cookie. when will it expire.
Cookies with an expiration date in the past will be removed from the browser. To remove a cookie, you must set it's set its expiration date in the past. This will signal to the browser that the cookie should be removed.
maxAge. Set the cookie "Max-Age" attribute. A positive value indicates when the cookie should expire relative to the current time. A value of 0 means the cookie should expire immediately.
YOU JUST CAN'T. There's no exact code to use for setting a forever cookie but an old trick will do, like current time + 10 years . Just a note that any dates beyond January 2038 will doomed you for the cookies (32-bit int) will be deleted instantly.
You can extend the life of a cookie beyond the current browser session by setting an expiration date and saving the expiry date within the cookie. This can be done by setting the 'expires' attribute to a date and time.
It means the cookie will expire at the end of the session (when the browser closes, but not always).
When user privacy is a concern, It is important that any web app implementation will invalidate cookie data after a certain timeout and won't rely on the browser clearing session cookies.
One of the most beloved features of Firefox prevents session cookies from ever expiring. The same issue is also occuring with google chrome (and probably with other browsers offering similar features)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With