I want to keep a user logged in as long as possible. What should I use?
or some combination of these?
I think a Flash cookie would probably stay around the longest for the simple reason that most people don't clear them too often. They don't show up in the usual browser dialogs and aren't cleared by the usual "clear cookies" feature.
Trying to tie a user to an IP address is useless and downright insecure if you're trying to keep people logged in. IP addresses change often and you shouldn't rely on it for anything serious.
I guess the best thing to do is use both a normal browser cookie and a Flash cookie. That way you catch all the Flash-less users (or those who block Flash by default) just in case.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With