Cookie Expire Time for Users

Discussion in 'HTML & Website Design' started by jamespv85, Sep 23, 2009.

  1. #1
    How long should I set cookie expire time for keeping users logged in? A month too long? 2 weeks perhaps?
     
    jamespv85, Sep 23, 2009 IP
  2. ohteddy

    ohteddy Member

    Messages:
    128
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    28
    #2
    I would say you should expire when the users session is finished (hit logout)
    or whenever the users session is older 24hrs. You can also put a 'Remember me'
    checkbox at login which overrides these defaults to say the session never expires.
     
    ohteddy, Sep 23, 2009 IP
  3. jphf

    jphf Peon

    Messages:
    51
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #3
    thats is completely depend on your site.

    what is your site ? is money making site ? what you need more security in your site ? and what your site is easily hackable ?

    if the answer is yes of above question then set cookie for 1 day. if not then you can set it for 100 days also.
     
    jphf, Sep 23, 2009 IP
  4. jamespv85

    jamespv85 Peon

    Messages:
    238
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #4
    oh ya, sorry if it's not very clear. it's for the "remember me" option. how long is a good expiration? THanks!
     
    jamespv85, Sep 23, 2009 IP
  5. ohteddy

    ohteddy Member

    Messages:
    128
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    28
    #5
    I can't really say one way or another. Maybe you want to checkout google's expiry and use that?
     
    ohteddy, Sep 23, 2009 IP