Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

what is stored in cookies [closed]

Tags:

cookies

I like to know What the content is stored in in cookies? Who will fix that content

like image 733
giri Avatar asked Jan 04 '10 08:01

giri


People also ask

What data is stored in a cookie?

A cookie typically contains two bits of data: a unique ID for each user, and a site name. Cookies enable websites to retrieve this information when you revisit them, so that they can remember you and your preferences and tailor page content for you based on this information.

What happens to cookies when browser is closed?

By default, the cookie is destroyed when the current browser window is closed, but it can be made to persist for a length of time after the page is closed. Some cookies are 'session cookies', which means they only exist when your browser is open and are automatically deleted when you close your browser or quit the app.

What is stored in cookie file?

The cookie file can contain your e-mail address, user name, and your password to certain sites that charge for viewing. It can contain your full name, address, and phone number, if you have gone to a site that requested this type of information.

Do cookies store history?

Cookies are small pieces of information websites can store in your browser. Cookies can also identify you and track your browsing activity across a website.


1 Answers

A cookie is often used to identify a user. A cookie is a small file that the server embeds on the user's computer. Each time the same computer requests a page with a browser, it will send the cookie too. With PHP, you can both create and retrieve cookie values.

Link - cookies

Explanation from the php.net:

PHP transparently supports HTTP cookies. Cookies are a mechanism for storing data in the remote browser and thus tracking or identifying return users. Cookies are part of the HTTP header, so setcookie() must be called before any output is sent to the browser.

like image 192
Alex Avatar answered Sep 27 '22 21:09

Alex