Results 1 to 6 of 6

Thread: Diffrence between cookies and session variables

  1. #1
    Join Date
    Dec 2009
    Posts
    33

    Diffrence between cookies and session variables

    Hi,
    I am a front end programmer in Company, I will work on web programmer that is based on java, I have confusion on session variables, Can anybody know that what is difference between cookies and the session variables, Please help me, It is very urgent.

  2. #2
    Join Date
    Apr 2008
    Posts
    1,949

    Cookies identify the user

    Cookies are stored on your local machine but the session variable is not stored on your local machine, so the browser can access them each time when you log in to a website with out having to prompt for the information again with the help of cookies. But for session variable, your session is ended the variable is destroyed. Session variables hold all information about one single user, and are available to all pages in one application but in cookies, is often used to identify a user.

  3. #3
    Join Date
    May 2008
    Posts
    2,015

    Data stored in a session variable is destroyed

    A cookie is a small file that the server embeds on the user computer. Each time when the user login on the same computer requests a page with a browser, it will send the cookie too. The downside of the cookies is that it can be blocked by some security settings. When the user logout, the data stored in a session variable is destroyed.

  4. #4
    Join Date
    Apr 2008
    Posts
    2,010

    Disadvantages of cookies.

    Basically Cookies is used in Client side but session variable used in server side. But the implementation of cookies is difficult. Also Size limitations and Potential security risks is cookies. Simple implementation, Process independent Support for server farm configurations and extensibility is the best future of session variable. Disadvantage of cookie is also that it will not work if the client user disable the cookie or don't accept cookie.

  5. #5
    Join Date
    May 2008
    Posts
    2,302

    Tracking Data setting by cookies.

    There is no option for disabling a session in the browser but in cookies you will disable the acceptance by browser setting. Data stored in session variable when the session ends. But in cookies, it store a small amount of data stored either in a text file on the client's file system. Cookies are mainly used for tracking data settings.

  6. #6
    Join Date
    Oct 2005
    Posts
    2,394

    E bay shopping cart utilized cookies

    A cookie is often used to identify a user but session variable is not stored on your local machine, so it can not identity the user . Session variables hold information about only one single user, and are available to all pages in one application but Cookies makes life easier for your user in most cases. Basically a cookie is a small file that the server embeds on the user's computer. Sessions works as a token allowing access and passing information while the user has their browser open. Cookies works as for example, your e bay shopping cart utilized cookies, and a person had their browser set to block them, then they could not shop at your website. User can also destroy the cookies.

Similar Threads

  1. Replies: 10
    Last Post: 07-03-2012, 08:41 AM
  2. What is the diffrence between AMD and Intel processors
    By Tungesh in forum Motherboard Processor & RAM
    Replies: 3
    Last Post: 20-08-2009, 09:41 PM
  3. Replies: 2
    Last Post: 20-06-2009, 12:16 PM
  4. Access classic asp session variables from asp.net
    By Zool in forum Software Development
    Replies: 3
    Last Post: 18-05-2009, 05:45 PM
  5. what is session and cookies
    By zoaib in forum Technology & Internet
    Replies: 1
    Last Post: 24-12-2008, 08:58 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •