Go Back   TechArena Community > Software > Software Development
Become a Member!
Forgot your username/password?
Register Tags Active Topics RSS Search Mark Forums Read

Sponsored Links



Diffrence between cookies and session variables

Software Development


Reply
 
Thread Tools Search this Thread
  #1  
Old 22-12-2009
Member
 
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.

Reply With Quote
  #2  
Old 22-12-2009
Member
 
Join Date: Apr 2008
Posts: 1,947
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.
Reply With Quote
  #3  
Old 22-12-2009
Member
 
Join Date: May 2008
Posts: 2,007
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.
Reply With Quote
  #4  
Old 22-12-2009
Member
 
Join Date: Apr 2008
Posts: 2,000
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.
Reply With Quote
  #5  
Old 22-12-2009
Member
 
Join Date: May 2008
Posts: 2,291
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.
Reply With Quote
  #6  
Old 22-12-2009
Member
 
Join Date: Oct 2005
Posts: 2,389
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.
Reply With Quote
Reply

  TechArena Community > Software > Software Development
Tags: , , , , , ,



Thread Tools Search this Thread
Search this Thread:

Advanced Search


Similar Threads for: "Diffrence between cookies and session variables"
Thread Thread Starter Forum Replies Last Post
Internet explorer 9 displays Cookies error message” IE9 works better when it is cookies enabled, please enable cookies” Bellare Technology & Internet 10 07-03-2012 08:41 AM
What is the diffrence between AMD and Intel processors Tungesh Motherboard Processor & RAM 3 20-08-2009 09:41 PM
How can I use javascript to track session ID & Visitor ID cookies? Kushan Software Development 2 20-06-2009 12:16 PM
Access classic asp session variables from asp.net Zool Software Development 3 18-05-2009 05:45 PM
what is session and cookies zoaib Technology & Internet 1 24-12-2008 08:58 PM


All times are GMT +5.5. The time now is 10:40 PM.