Globale linker

Book 1

Book 2

Book 2 Ch. 5 Cookies

Cookies are small text files that have a variety of uses. They are used by the operating system and applications to remember user states. Cookies are sent from the server to the user's browser in the HTTP response header. The browser accepts the response from the page assigning the cookie, then accepts (or gives the user the chance to accept or reject) the cookie. The browser program then stores the cookie information in a file on the user's system.

When the HTTP request is generated, any cookies on the user's system with a path and domain name matching the current HTTP request will be passed along in the request header. The server can then test for and evaluate the contents of the incoming cookie.

A cookie header appears to your browser as follows:

set-cookie: name=value; expires=date; path=path;
domain=domain; secure

The name-value pair is the only information required to generate a cookie. All other cookie attributes are optional.

One of the most common uses of cookies is to store information about the user to maintain state.

Browsersettings can be adjusted to accept or reject cookies, or to alert the user every time a cookie is sent.

Navigator stores cookies in the cookies.txt file. This file lists all the cookies downloaded by the browser. Selecting and deleting the contents of this file will remove the cookies from your system.

IE stores cookies under a subdirectory of Windows called Cookies. IE stores each cookie as a separate text file. These files can be deleted.

Chapter 4 Book 2 Chapter 6 Book 2