Cookies

A version of this page is also available for

Windows Embedded CE 6.0 R3

4/8/2010

Cookies are used for tracking data settings, or data for a particular Web site. The cookies are saved on the client device, and when the browser requests a page, it sends the data settings for that page along with the request. A third-party cookie is one that allows information to be forwarded to a Web site other the one currently being accessed by the browser. In Internet Explorer 6, when a third-party cookie is sent to the browser can generate a dialog box that asks the user whether to accept or block the cookie. When third-party cookies are blocked the browser can only send cookie data back to the server that originally created them.

Cookies can be temporary or persistent. Persistent cookies, which have an expiration date, are stored in the location specified in the HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders registry key. The default location is \Windows\Profiles\Guest\Cookies. Session cookies, which do not have an expiration date, are stored in memory and are available only to the process in which they were created.

The Windows Internet Services (WinInet) cookie functions are used to set cookies into and access cookies from the cookie database. Unlike most WinInet functions, the cookie functions do not require a call to InternetOpen. Use the WinInet functions InternetSetCookie, InternetSetCookieEx, and InternetGetCookie to retrieve and set cookies.

Remarks

Persistent cookies, which have an expiration date, are stored in the location specified by the HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders registry key. The default location is Windows\Profiles\Guest\Cookies. WinInet will create the cookie and delete is under <the following conditions>. Session cookies, which do not have an expiration date, are stored in memory and are available only to the process in which they were created.

See Also

Concepts

HTTP Sessions