Developer community
0 votes
32 views
asked by Guru (24.6k points) 29 51 78 | 32 views

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 Guru (39.1k points) 10 22 34
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 Geek (15.3k points) 17 40 60

Related questions

0 votes
1 answer
asked by sara Guru (24.6k points) 29 51 78 | 18 views
0 votes
1 answer
asked by sara Guru (24.6k points) 29 51 78 | 46 views
0 votes
1 answer
asked by smith Geek (15.3k points) 17 40 60 | 50 views
0 votes
2 answers
asked by smith Geek (15.3k points) 17 40 60 | 30 views
Quick search syntax
tags tag:apple
author user:martin
title title:apple
content content:apple
exclude -tag:apple
force match +apple
views views:100
score score:10
answers answers:2
is accepted isaccepted:true
is closed isclosed:true

Categories


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

3.8k questions

4k answers

117 comments

10.7k users

3,751 questions
4,046 answers
117 comments
10,709 users