What is the difference between a Cookie and a Session? - ProProfs Discuss
Advertisement

What is the difference between a Cookie and a Session?

What is the difference between a Cookie and a Session?

Change Image    Delete

Asked by R. Barnes, Last updated: Dec 22, 2024

+ Answer
Request
Question menu
Vote up Vote down

7 Answers

vinita sharma

vinita sharma

I’m Vinita Sharma working in Digital Marketing. I have currently working in digital Marketing fields including – SEO, SMO, and International Marketing

vinita sharma
Vinita sharma, Dightil Marketing, MCA, Delhi

Answered Jan 30, 2020

Session data is stored on the server, whereas cookies store data in the visitor's browser. Sessions are more secure than cookies and cookies can be turned off from the browser.

upvote downvote
Reply 

L. Agate

L. Agate

L. Agate
L. Agate

Answered Oct 11, 2019

A cookie and a session, they are both terms used in web programming. First of all, talking about the cookie, it is a client-side file in which information is contained. This information might be things in a shopping cart or a combination of username and password. Cookies can be dangerous sometimes, as they can be stolen. The public Wi-Fi usually gives room for hackers to access and steal your cookies and where they can have access to your personal information and even your bank account details.

A cookie and a session, they are both terms used in web programming. First of all, talking about
On the other hand, a session is well used in PHP. Thus it can be said to be an unfixed piece of information that is stored on the server-side of a site. This can be either a unit of settings, state, and variables. Sessions are known to be protected by some server-side security, and this makes them be more secure than the cookies.

upvote downvote
Reply 

Tara Pele

Tara Pele

I am Tara & working as a Technical Blogger.

Tara Pele
Tara Pele, Technical Blogger, MCA from New York, New York

Answered Oct 03, 2019

Cookies refer to a collection of data, usually the client-side of a web browser. It stores information on a user’s computer in text file format, and it contains a user’s personal information. They are used to identify sessions. Cookies have a limited amount of storage. A single cookie cannot hold many values. Sessions are a collection of data usually stored on the server-side.

Cookies refer to a collection of data, usually the client-side of a web browser. It stores
It is associated with the cookie information. Sessions are more secure than cookies. However, the data available in the session is lost the moment the web browser is closed. It stores things like passwords and usernames on specific web pages. There are no storage limits on sessions, and they can hold multiple variables, unlike cookies.

upvote downvote
Reply 

Malcolm Carneal

Malcolm Carneal

Get immense pleasure in traveling and writing about visiting places.

Malcolm Carneal
Malcolm Carneal, Digital Nomad, MCA, Vienna

Answered Sep 30, 2019

Cookies and sessions are closely related; however, there is more danger with cookies. A cookie contains a computer user's private information, such as a username and password combination. A session, on the other hand, can have a lot of different definitions.

Cookies and sessions are closely related; however, there is more danger with cookies. A cookie
A session may be launched when you log into your computer and then stopped when it is shut down. However, in the context of programming, it is mostly used in the server-side language. Sessions are more secure than cookies because some server security usually protects them. The session stores your username and password. This cookie will possess specific id which connects to the session the next time the user is online.

upvote downvote
Reply 

I. Woods

I. Woods

I. Woods
I. Woods

Answered Sep 16, 2019

A cookie in this context does not refer to the cookie that we eat. It refers to the file that stores information on a client’s computer. It stores a client-side of information. Example of information stored on the cookie is a person’s username, age, address or password on a website. Cookie remembers your information unless you delete it or it expires.

A cookie in this context does not refer to the cookie that we eat. It refers to the file that
This is what happens when you click on “remember me” option when it pops up. It is less secure compared to sessions. On the other hand, sessions refer to how information is stored on the server’s hand. The sessions store certain information on the server-side of a website. Session is more secure than a cookie. Hope you find this information helpful.

upvote downvote
Reply 

I. Muller

I. Muller

I. Muller
I. Muller, Math Professor, North Carolina

Answered Sep 03, 2019

You may think that the cookie refers to something that you can eat but cookie and session are terms that are used when you use Java. The session is a type of data that is normally stored on the server. Cookies, on the other hand, are also data that will be stored on the devices of the visitors of the website. For example, you may be a regular visitor on a certain website.

You may think that the cookie refers to something that you can eat but cookie and session are terms
This website will load faster whenever you use the same IP address and gadget to access it as compared to someone who is visiting the website for the first time. This is because of the cookies. There are certain data that will be stored to make visiting the website far easier and faster.

upvote downvote
Reply 

Anthony Paul Bonadio

Anthony Paul Bonadio

Its kind of my job to give answers

Anthony Paul Bonadio
Anthony Paul Bonadio, Teacher, MCA, PhD, Toledo

Answered Aug 27, 2019

You may think that the cookie represents the type of cookie that you can eat, but this is not the case at all. The cookie here represents the session data that is currently stored in the browser of the person who is checking out the different websites. This will make it easier for the same website to load if in case the person will visit the website again.

You may think that the cookie represents the type of cookie that you can eat, but this is not the
The session data is usually stored in the server. There is no limit to the amount of data that will be stored there. A lot of people consider the session data to be more secure as compared to the cookie. The session data and the cookies can be cleared whenever needed.

upvote downvote
Reply 

Advertisement
Advertisement
Search for Google images Google Image Icon
Select a recommended image
Upload from your computer Loader
Image Preview
Search for Google images Google Image Icon
Select a recommended image
Upload from your computer Loader
Image Preview
Search for Google images Google Image Icon
Select a recommended image
Upload from your computer Loader

Email Sent
We have sent an email to your address "" with instructions to reset your password.