Cookies query

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View

Is it possible to expire the cookies only after a some idle time.


Re: Cookies query

anush wrote:
Quoted text here. Click to load it

Well you can set the COOKIE to expire after a short while, and with each
page request, update the cookie.  If there is no page request past that
expiration period, then it will expire.

Also read up on the primary source for PHP info.


Re: Cookies query

Quoted text here. Click to load it

Maybe - a lot depends on what you mean by idle, and what you are
trying to achieve.

Whenever you set a cookie you can specify an expiry time. If you drop
a new copy of the cookie with a revised idle time every time a page is
accessed this will have the same effect, however you cannot rely on
user-submitted data for implementing any sort of security measure.

There is already funtionality built in to the session handler to
handle idle connections - why not just use that?


Site Timeline