answersLogoWhite

0


Best Answer

Cookies persist on your local computer, they are small text files that are stored there by websites and web applications that contain some basic information about you as a user.

Sessions are application specific and persist only as long as you are actively engaged with a particular web site. For instance if you leave Amazon.com open do some shopping, then close the web browser before making any purchases, your session has ended, however the cookie that identifies your username still exists on your local computer.

User Avatar

Wiki User

16y ago
This answer is:
User Avatar
More answers
User Avatar

Wiki User

14y ago

While providing much of the same functionality, a session variable will be deleted at the end of the users session, or visit to your page. A cookie will not expire until the time indicated when it was created. I believe session variables are considered more secure.

This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: Difference between the session and cookie?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

WHAT is the difference between session and cookie in php?

The session is stored on the web server. The cookies is stored in a little file on users machine. This means that the session is (relatively) secure, whereas the cookie can be edited by the end user.


What is the difference between a stolen cookie and a new cookie?

nothing


What is session.cookie secure?

Session cookie secure is a kind of software sent to the user's browser from the browsing website, to secure your data. Session cookie is a temporary cookie .When the user closes the browser, web browser automatically deletes the session cookie.


What is the difference between the black LG Cookie and the white LG Cookie?

There is no technical difference between these two handsets other than the colour!!


How to make a web session expire?

make a cookie expire the session for eg. if (!$cookie = "set") { expire session; }else { $coockie = $co0kie +34*64; }


What is the difference between the cookie?

It's not a toad!! lol.


Difference between removeAttribute and invalidate in Session?

Using the remove Attribute tag will just remove the stated attributes from the session. Using session invalidate will terminate the entire session.


What is the difference between a earthworm and a cookie?

one is alive and one isn't


Difference between Cookies and Session in AspNet?

* The main difference between cookies and sessionsis that cookies are stored in the user's browser, and sessions are not. This difference determines what each is best used for.* A cookie can keep information in the user's browser until deleted. If a person has a login and password, this can be set as a cookie in their browser so they do not have to re-login to your website every time they visit. You can store almost anything in a browser cookie. * The trouble is that a user can block cookies or delete them at any time. If, for example, your websites shopping cart utilized cookies, and a person had their browser set to block them, then they could not shop at your website. * Sessions are not reliant on the user allowing a cookie. They work instead like a token allowing access and passing information while the user has their browser open. The problem with sessions is that when you close your browser you also lose the session. So, if you had a site requiring a login, this couldn't be saved as a session like it could as a cookie, and the user would be forced to re-login every time they visit.


What is the difference between air bake and insulated cookie sheets?

insulated cookie sheets hold the heat from the oven longer than an air bake cookie sheet


What is the difference between session key and master key?

A session key is a temporary encryption keyused between two principals.A master key is a long-lasting key that isused between a key distribution centre and aprincipal for the purpose of encoding thetransmission of session keys.Typically, the master keys are distributed bynoncryptographic means.


Is there a difference in quality between cookie mixes and premade dough in the refridgerator aisle?

There is not a quality difference. The only difference is that the premade dough does not need eggs and butter added to it.