![]()
|
|
|||||||||||||
|
|
Synopsis
Read only This collection gives access to the cookies sent by the client to the server. This collection cannot be used to create or
set cookies; to set cookies, one must use the collection The Reminder about the cookiesA cookie is a piece of information (a login, a session ID...) the client and the server exchange within the headers of an HTTP message. This piece of information is actually only useful to the server, even if the client holds it (in memory, or in a specific file on a hard drive). A cookie the server sends to a client cannot but be used by this server. This allows customization of cookies and the safe keeping of confidential data. Since it does not store the cookies it sends from one page to another, a Web server cannot but use a cookie if and only if the
client sends it back. Therefore, a client would send the cookies it holds in every HTTP request it makes to the server. This is why
in ASP, we access (read) the cookies thanks to the object For further details about cookies, see the HTTP section. Us of the collection Request.CookiesCookies' namesEvery cookie has a name (exactly like variables). Therefore, to read the value of a cookie, we use its name:
The keys and the attribute HasKeysWe can use the cookies as dictionaries (associative arrays); keys are then used to access to the different elements:
To know if a cookie has keys (i.e. to know if it is a dictionary), we use the only attribute of the collection:
|
|||||||||||||
|
Copyright © 2000-2002 themanualpage.org - This site is submissive to the terms of the GNU GPL and FDL licences. |
||||||||||||||