Or you can say, a cookie is a message given to a web browser by a web server. The browser stores the message in a text file. The message is then sent back to the server each time the browser requests a page from the server.
The main purpose of cookies is to identify users and possibly prepare customized web pages for them.
When you enter a web site using cookies, you may be asked to fill out a form providing such information as your name and interests. This information is packaged into a cookie and sent to your web browser, which stores it for later use. The next time you go to the same web site, your browser will send the cookie to the web server. The server can use this information to present you with custom web pages.
The name cookie derives from UNIX objects called magic cookies. These are tokens that are attached to a user or program and change depending on the areas entered by the user or program.
Cookies do not act maliciously on computer systems. They are merely text files that can be deleted at any time, they are not plug ins nor are they programs.
Cookies cannot read your hard drive to find out information about you, however, any personal information that you give to a web site, including credit card information, will most likely be stored in a cookie unless you have turned off the cookie feature in your browser. In only this way are cookies a threat to privacy.
The cookie will only contain information that you freely provide to a web site.
Parameters of Cookies
Cookies have six parameters that can be passed to them:
- The name of the cookie
- The value of the cookie
- The expiration date of the cookie, determines how long the cookie will remain active in your browser
- The path the cookie is valid for, sets the URL path the cookie is valid in. Web pages outside of that path cannot use the cookie
- The domain the cookie is valid for, takes the path parameter one step further. This makes the cookie accessible to pages on any of the servers when a site uses multiple servers in a domain
- The need for a secure connection, indicates that the cookie can only be used under a secure server condition, such as a site using SSL
« Previous Tutorial Next Tutorial »
Like/Share Us on Facebook 😋