I can't seem to access the expiration date from the cookie?

I want to emulate a sliding expiration for a website, but I cannot access the expiration time of my cookie.

0


a source to share


1 answer


It really depends on the technology stack being used and whether the cookie handling can be intercepted or overridden. In most cases, however, the expiration date is handled by the server to check if the cookie should be ignored or not (and in many cases the client can make that decision and not even send expired cookies).



If you want your application to reliably access the cookie parameter for the application, it would be better to add this field to the cookie value rather than relying on the expiration field, which is considered part of the cookie metadata. Of course, it is redundant, but it will work much more reliably.

0


a source







All Articles