what is the difference between sessions and cookies

Both sessions and cookies are used to store user information

but what is the exact difference between sessions and cookies?

when to use cookies and when to use sessions?

@Big_k sir it would be great if you can explain me taking example of CE?

Replies

  • durga ch
    durga ch
    let BIg k explain you in what ever formats you want ,but in general - cookie are small samples of your browsing information and session is generally a specific ongoing interaction between the user and the internet.Cookies are in turn used to maintain a continuous session. For example - you log into a bank web page and navigate across the pages of say share market your accounts et al. each time you send a request to the server asking for a specific page , does that mean the server will end up asking you to authenticate your self each time? cookies are used kinda used here to maintain the sessions between the user and the bank server till the user clicks 'logout'
  • Manish Goyal
    Manish Goyal
    Thanks Durga for your reply

    Can we maintain a continuous session using sessions alone?

    what can be the maximum life of a cookie?
  • durga ch
    durga ch
    are you talking only in context of application layer ?
    sessions can be established without cookies ( i would need someone to support me here). For example - when I log into a switch or a dslam or for that matter do a simple tlnet to a distant machine , i generally establish a session with the remote server. my session will expire on some time or when i logout and close the session.
  • Pensu
    Pensu
    In a simple way cookies are stored in your browser and session is maintained in server. You have full access on cookies i.e. u can delete them but you can't erase the session until unless you have access to server.


    Correct me if i am wrong.
  • computeridiot007
    computeridiot007
    in simple way,
    sessions will be processed on the server side
    whereas cookies will be processed on the client side.
    hope it will be clear
  • Manish Goyal
    Manish Goyal
    Thanks Guys for your replies but one of the important difference, i found today is sessions data cannot be moved from one web server to another ie if situations comes when there is a need to redirect a visitor of a website to another web server,there sessions will fail ,at that time cookies serve the purpose

You are reading an archived discussion.

Related Posts

SPAIN has designed the world's first robot with its own " conscience "and " life " , which will entertain, teach and be a companion to humans who purchase it....
i am ccna certified , need some ideas about networking project live and working and can be used by students , security related or wireless
Meaning: peaceful, gentle and calm, happy and carefree Use: The halcyon days of the patient came to an end and were followed by times of suffering. Syn: tranquil, happy, idyllic,...
Meaning: misleading, equivocating Usage: The clue to the hidden treasure provoked to be fallacious. Syn: inaccurate, deceptive, specious
Most original ideas....... Most original ideas come from the individuals working alone