search
Login

Categories


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

3.8k questions

4k answers

117 comments

10.7k users

0 votes
32 views
asked Guru 24.6k points 29 52 81

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 Guru 39.1k points 10 21 33
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 Geek 15.3k points 16 41 63

Related questions

0 votes
1 answer 24 views
0 votes
1 answer 16 views
16 views
asked sara Guru 24.6k points 29 52 81
0 votes
1 answer 50 views
0 votes
1 answer 54 views
54 views
asked smith Geek 15.3k points 16 41 63
0 votes
2 answers 30 views
30 views
asked smith Geek 15.3k points 16 41 63
...