Cookie is a small amount of information sent by server to
web browser, saved by browser and later sent back to server
when the client accesses the same web page.
Constructor
Creates and returns a new Cookie.
Methods
Returns the comment the describing purpose of this cookie.
Returns the domain name set for this cookie.
Returns the maximum age of the cookie, specified in seconds.
Returns the name of cookie.
Returns the paths (that is, URIs) on the server to which the
browser returns this cookie.
Returns true is the browser is sending cookies
only over secure protocol.
Returns the value of cookie.
Returns the version of the protocol this cookie complies with.
Specifies a comment that describes a cookie's purpose.
The comment is useful if the browser presents the cookie to
the user. Comments are not supported by Netscape Version 0 cookies.
Specifies the domain within which this cookie should be presented.
The form of the domain name is specified by RFC 2109. A domain name
begins with a dot (.foo.com) and means that the cookie is visible
to servers in a specified Domain Name System (DNS) zone (for example,
www.foo.com, but not a.b.foo.com). By default, cookies are only
returned to the server that sent them.
Sets the maximum age of the cookie in seconds.
A positive value indicates that the cookie will expire after
that many seconds have passed. Note that the value is the
maximum age when the cookie will expire, not the cookie's current age.
A negative value means that the cookie is not stored persistently and will be deleted when the Web browser exits. A
zero value causes the cookie to be deleted.
Specifies a path for the cookie, which is the set of URIs
(Universal Resource Identifiers, the part of an URL that represents
the server path) to which the client should return the cookie.
Indicates to the browser whether the cookie should only be sent
using a secure protocol, such as HTTPS or SSL.
Assigns a new value to a cookie after it is created.
Stored value should be encoded with, for instance, BASE64
or URL encoding.
Sets the version of the cookie protocol this cookie complies with.
Version 0 complies with the original
Netscape cookie specification. Version 1 complies with RFC 2109.
Since RFC 2109 is still somewhat new, consider version 1 as experimental;
do not use it yet on production sites.