Sunday, September 7, 2008

What is Cookie

cookie

(1) A small amount of data sent back to the requesting party by the recipient. Also called a "magic cookie," it provides information about the transaction, such as an ID or session number, which may be required later either by the recipient or a third party. This is the same concept as definition #2 below, but not specific to the Web.

(2) A small data file created by a Web server that is stored on your computer either temporarily for that session only or permanently on the hard disk (persistent cookie). Cookies provide a way for the Web site to recognize you and keep track of your preferences.

Cookies Are Beneficial
Cookies are commonly used to "maintain the state" of the session as a user browses around the site. The shopping cart is an example. You can place an item in the cart, switch to another page or even another site, and when you come back, the site knows who you are, and you can continue with the order. Without cookies, the site would not be able to identify you automatically because the Internet is "stateless." See state and stateless.

Cookies contain a range of URLs (addresses) for which they are valid. When the Web browser or other HTTP application sends a request to a Web server with those URLs again, it also sends along the related cookies. For example, if your user ID and password are stored in a cookie, it saves you from typing in the same information all over again when accessing that service the next time. By retaining user history, cookies allow the Web site to tailor the pages and create a custom experience for that individual.

Your Cookies Know You
Quite a bit of personal data may reside in the cookie files in your computer. As a result, this storehouse of private information is sometimes the object of attack (see cookie poisoning.)

First-Party Cookies
The default settings in your Web browser typically allow "first-party" cookies, but not "third-party" cookies. First-party cookies are created by the Web site you are visiting and are necessary to keep track of your preferences and the current session as explained above.

Third-Party Tracking Cookies
Third-party cookies are created by a Web site other than the one you are currently visiting; for example, by a third-party advertiser on that site. The purpose of such cookies is usually to track your surfing habits, which is why third-party cookies are considered an invasion of privacy and riskier than first-party cookies.

Configuring Settings
A Web browser can be configured so that only first-party cookies coming from the originating sites are maintained. It can also be set to prevent all cookies from being stored in your computer, but that severely limits the Web surfing experience. To change settings, look for the cookie options in your browser in the Options or Preferences menu. See Web bug, cookie file and state.

No comments: