How long should I set cookie expire time for keeping users logged in? A month too long? 2 weeks perhaps?
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.
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.
oh ya, sorry if it's not very clear. it's for the "remember me" option. how long is a good expiration? THanks!