CrazyEngineers
  • what is the difference between sessions and cookies

    Manish Goyal

    Manish Goyal

    @manish-r2Hoep
    Updated: Oct 26, 2024
    Views: 971
    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?
    0
    Replies
Howdy guest!
Dear guest, you must be logged-in to participate on CrazyEngineers. We would love to have you as a member of our community. Consider creating an account or login.
Replies
  • durga ch

    MemberAug 2, 2010

    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'
    Are you sure? This action cannot be undone.
    Cancel
  • Manish Goyal

    MemberAug 2, 2010

    Thanks Durga for your reply

    Can we maintain a continuous session using sessions alone?

    what can be the maximum life of a cookie?
    Are you sure? This action cannot be undone.
    Cancel
  • durga ch

    MemberAug 3, 2010

    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.
    Are you sure? This action cannot be undone.
    Cancel
  • Pensu

    MemberAug 3, 2010

    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.
    Are you sure? This action cannot be undone.
    Cancel
  • computeridiot007

    MemberAug 3, 2010

    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
    Are you sure? This action cannot be undone.
    Cancel
  • Manish Goyal

    MemberAug 4, 2010

    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
    Are you sure? This action cannot be undone.
    Cancel
Home Channels Search Login Register