Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Session cookies = cookies?

I wonder if cookies are the same as session cookies?

like image 411
ajsie Avatar asked Feb 11 '11 04:02

ajsie


People also ask

What are cookies and session cookies?

Cookies are client-side files on a local computer that hold user information. Sessions are server-side files that contain user data. Cookies end on the lifetime set by the user.

Why are session cookies called cookies?

Origin of the name The term "cookie" was coined by web-browser programmer Lou Montulli. It was derived from the term "magic cookie", which is a packet of data a program receives and sends back unchanged, used by Unix programmers.

What is the difference between session cookies and persistent cookies?

The most significant difference between persistent and session cookies is the expiration date. Both persistent and session cookies store a user's information, settings, preferences, or sign-on credentials, when the user consents to such information being stored.

Which is better session or cookies?

Sessions are more secured compared to cookies, as they save data in encrypted form. Cookies are not secure, as data is stored in a text file, and if any unauthorized user gets access to our system, he can temper the data.


1 Answers

A cookie is a cookie.

"Session cookie" can refer to one of two things:

  • A cookie with unspecified timeout, which will be discarded as soon as the browser is closed. I.e. the browser will only retain it for the current "browsing session."
  • A cookie containing a session id.

Sometimes it means both. It's not a very well defined term.

As such, the correct description would be session cookie ⊆ cookie,
instead of session cookie = cookie. ;o)

like image 147
deceze Avatar answered Oct 26 '22 18:10

deceze