Cookie Class Properties
In this section, we discuss the Cookie class properties. The properties are discussed in alphabetical order.
Description
This property returns the domain of this cookie, or null if not defined. This property is a string value.
This property is read-write.
Example
&cookie = &Response.AddCookie("My cookie", "My value");
&cookie.Domain = ".MyDomain.com";
Description
This property represents the maximum specified age of the cookie, as a signed number in seconds. The default value is -1. Setting the MaxAge property to a negative value ensures the cookie does not persist on the client when the client session ends. If the MaxAge property is set to zero, the cookie is deleted immediately from the client.
Value |
Description |
---|---|
Non Negative Integer |
Lifetime of the Cookie in seconds |
0 |
Delete the cookie from the client immediately |
-1 |
Default MaxAge property value (remove the cookie after the client exits) |
Negative Integer |
Remove the cookie after the client exits |
This property is read-write.
Description
This property returns the name of the cookie as a string.
This property is read-only.
Description
This property returns the prefix of all the URL paths for which this cookie is valid, or an empty string if not defined.
This property is read-write.
Description
This property specifies whether the cookie is to be secured. This property takes a Boolean value. The default value is False. Secure cookies are sent only if the client has established a secure link (such as HTTPS) with the server. This property is read-write.
Description
This property returns the value of the cookie (as a string), or an empty string if it isn't defined.
This property is read-write.