Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re: What is Difference between Session and Cookie

by marto (Cardinal)
on Mar 28, 2007 at 12:01 UTC ( #606992=note: print w/replies, xml ) Need Help??


in reply to What is Difference between Session and Cookie

Since there is no mention on Perl in your question I guess you are looking for some general information. See Session and cookie. You could have made a little effor to look those up yourself. Please read the PerlMonks FAQ and How do I post a question effectively? if you have not already done so.

Martin
  • Comment on Re: What is Difference between Session and Cookie

Replies are listed 'Best First'.
Re^2: What is Difference between Session and Cookie
by Anonymous Monk on May 09, 2011 at 20:10 UTC
    The main difference between cookies and sessions is that cookies are stored in the user's browser, and sessions are not. A cookie can keep information in the user's browser until deleted. Sessions work instead like a token allowing access and passing information while the user has their browser open. The problem with sessions is that when you close your browser you also lose the session. I have read the very good post on cookies and sessions with suitable php code.You can see that in http://cs-pages.blogspot.com/2011/05/difference-between-cookies-and-sessions.html
      The problem with sessions is that when you close your browser you also lose the session.

      That is not a property of sessions.

      If closing your browser deletes cookies, and deletes the session cookie, then there is nothing associating your browser and the session, and the session can be considered lost.

      If however, a session is also associated with an account, breaking the association with the browser (deleting cookies) doesn't break the association with the account -- you can resume the session after you log-in again

Re^2: What is Difference between Session and Cookie
by Anonymous Monk on Dec 08, 2010 at 23:10 UTC
    Martin's answer is more self-serving than informative since the definitional difference between cookies and sessions are congruent among all languages.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://606992]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (3)
As of 2021-09-28 08:33 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?