tags:

views:

51

answers:

1

Hi,

I want to mimick a sliding expiration for a website, but I can't seem to access the expiration time on my cookie.

A: 

It really depends on the technology stack you're using and whether you can hook into or override the cookie processing. In most cases, though, the expiration date is handled by the server to see if the cookie should be ignored or not (and in many cases, the client may make this decision and not even send expired cookies).

If you want your application to reliably be able to access an app-specific cookie parameter, it would be best to add this field to the cookie value rather than relying on the expiration field which is considered part of the cookie metadata. Sure, it's duplicative, but it will work much more reliably.

Brad B