PHP

NAVIGATION
CATEGORIES
REFERRENCE
LINKS
  • Really stupid cookie question

    2 answers - 246 bytes - related search similar search Add To My Delicious Add To My Stumble Upon Add To My Google Mark Add To My Facebook Add To My Digg Add To My Reddit

    I am embarrassed to ask this. If I set a cookie for 30 days, and the
    visitor comes back 25 days later but I do nothing to re-set the
    cookie, will his cookie expire in 5 days, or does his browser
    automatically reset it to another 30 days?
  • No.1 | | 758 bytes | |

    PGP SIGNED MESSAGE
    Hash: SHA1

    Brian Dunning wrote:
    I am embarrassed to ask this. If I set a cookie for 30 days, and the
    visitor comes back 25 days later but I do nothing to re-set the cookie,
    will his cookie expire in 5 days, or does his browser automatically
    reset it to another 30 days?

    General Mailing List (http://www.php.net/)
    To unsubscribe, visit: http://www.php.net/unsub.php

    It will expire in 5 days.
    - --
    Christopher Weldon, ZCE
    President & CE
    Cerberus Interactive, Inc.
    cweldon (AT) cerberusonline (DOT) com
    979.739.5874
    PGP SIGNATURE
    Version: GnuPG v1.4.1 (Darwin)
    Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

    CPxgJw6t1R/VQnE=
    =oH63
    PGP SIGNATURE
  • No.2 | | 690 bytes | |

    Brian Dunning wrote:
    I am embarrassed to ask this. If I set a cookie for 30 days, and the
    visitor comes back 25 days later but I do nothing to re-set the
    cookie, will his cookie expire in 5 days, or does his browser
    automatically reset it to another 30 days?

    That depends on if you reset the cookie when they come back or not. If
    your routines set the cookie only if the cookie does not already exist,
    then it would not reset the cookie at 25 days, so it would indeed expire
    5 days after that.

    If you check to see if the cookie exists first, and then reset the
    expiration date at that time, then the cookie would last for another 30
    days

    Tim.

Re: Really stupid cookie question


max 4000 letters.
Your nickname that display:
In order to stop the spam: 4 + 3 =
QUESTION ON "PHP"

EMSDN.COM