C Books Guide and List
C++ Books Guide and List
Best Java Books

3,749 questions

4,049 answers

114 comments

10,705 users

What is the difference between Session and Cookie?

0 votes
25 views
asked Jan 1, 2014 by sara Guru (24,570 points)

2 Answers

0 votes
The main difference between sessions and cookies is that sessions are stored on the server, and cookies are stored on the user’s computers in the text file format. Cookies can not hold multiple variables,But Session can hold multiple variables.We can set expiry for a cookie,The session only remains active as long as the browser is open.Users do not have access to the data you stored in Session,Since it is stored in the server.Session is mainly used for login/logout purpose while cookies using for user activity tracking.
answered Jan 1, 2014 by rajesh Guru (39,140 points)
0 votes
1)Session is stored in server but cookie stored in client.

 2)Session should work regardless of the settings on the client browser.

3)There is no limit on the amount of data that can be stored on session. But it is limited in cookie.

4)Session can store objects and cookies can store only strings. Cookies are faster than session.
answered Jan 3, 2014 by smith Geek (15,340 points)

Related questions

0 votes
1 answer 12 views
12 views asked Jan 2, 2014 by sara Guru (24,570 points)
0 votes
1 answer 44 views
0 votes
1 answer 49 views
49 views asked Dec 31, 2013 by smith Geek (15,340 points)
0 votes
2 answers 26 views
26 views asked Dec 31, 2013 by smith Geek (15,340 points)
...