|
Posted by Gordon Burditt on 10/14/63 11:28
>If it does reside in RAM, how can you set it to have a lifetime of
>years? Once the user turns the computer off, doesn't this flush the
>system memory and thus kill any cookie settings that were set?
Look at the PHP documentation for setcookie(). A session-only
cookie (one created by calling setcookie with an expire time of 0)
will expire when the browser is closed. It doesn't have an expire
time, and might manage to last more than 2 years if the browser
stays open that long. It's not stored on disk, at least in most
browsers.
A non-session-only cookie will have an expire time, often given to
setcookie() as time() + a number of seconds to last. These cookies
will be stored on disk somewhere. Where depends on the browser,
but it's likely to be in a similar place to where the browser
configuration parameters are stored.
Gordon L. Burditt
Navigation:
[Reply to this message]
|