Page 1 of 1

difference between cookies and sessions

Posted: Sat Feb 11, 2012 5:28 pm
by username0
I can use sessions to remember the username and password. When do I need cookies?

(sorry if this is not the right area to ask, because this is not a code)

Re: difference between cookies and sessions

Posted: Sat Feb 11, 2012 11:03 pm
by Christopher
Cookie data stored in the browser and transmitted each request to the server. Session data is stored on the server and uses information sent by the browser to identify unique users. To confuse you more, sometime that identifying information is cookie.

Either can be used to store whether a user has been authenticated. However, cookie data can be create by the user.