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

3,749 questions

4,049 answers


10,705 users

What is the difference between Session and Cookie?

0 votes
asked 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 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 by smith Geek (15,340 points)

Related questions

0 votes
1 answer 12 views
12 views asked by sara Guru (24,570 points)
0 votes
1 answer 46 views
0 votes
1 answer 50 views
50 views asked by smith Geek (15,340 points)
0 votes
2 answers 27 views