Please login or register. Welcome to the Studio, guest!


Quick Links:


newBookmarkLockedFalling

fireindy

fireindy Avatar

**
Official Member

114


May 2007
I was just doin some thinking, what do you think is more secure, sessions or cookies, when it comes to logins. I thought of some pros and cons:

+ = Pro
- = Con

Sessions:
-Last for browser up time.
+Easy to modify the variables

Cookies:
+Can staff for longer than browser up time.
-Harder to keep track of(for me :P)

What do you think.



Chris

Chris Avatar

******
Head Coder

19,519


June 2005
With sessions if a user forgets to logout but closes their browser on a public computer, another person can't (easily) access their controls on the website. That's one plus.

Scorpian

Scorpian Avatar

******
[ Bracket Admin ]

2,457


April 2006
I use a combination of both. You use the database and cookies to double-check that they're logged in. You then set a session variable saying so. That makes it extremely easy to work functions that differ from guests and members. You then, of course, delete the cookies, modify the database, and modify the session var when the user manually logs out. :)
wat

newBookmarkLockedFalling