Cookies Property

Applies To   See Also  

Returns a cookie's name, path, value and expiry date, which was sent as a part of an HTTP request. (Cookie Collection, Read-Only.)

Example  
Syntax (VBScript)

Request.Cookies(CookieName)(Key).Property = Value

Syntax (JavaScript)

Request.Cookies.Item(CookieName).SubItem(Key).Property = Value

It is recommended that you use the helper_js.csp file for cross-platform compatibility. See Some key functions in helper_js.csp for more information.

Parts

CookieName

Optional string value for the name of the cookie you wish to access. If you do not include this, you will access one of the properties listed in the Cookie Collection Properties.

Key

Optional string. If this is specified the cookie becomes a dictionary. See Remarks.

Property

Optional name of the property you wish to access. Note that this is not a variable. It may be one of the properties listed in Cookie Property Values.

Value

The value of the cookie's property depends on the property.

Remarks

If you do not specify a key for the cookie, all keys are returned as a single string.

Consult the tables for Cookie Property Values and Cookie Collection Properties for more information.

A client can only store a maximum of 20 cookies per server or domain with a maximum size of 4KB per cookie.

Cookie Property Values

Property Description

Expires

The date that the cookie expires. The date is in coordinated universal time. (Date, Read-Only)

HasKeys

TRUE if the cookies has keys and FALSE otherwise. (Boolean, Read-Only)

Name

The name of the cookie. (String, Read/Write)

Path

The path of the cookie. If this is not set, the root path is used. (String, Read-Only)

Value

The value of the cookie. (String, Read/Write)

Cookie Collection Properties

Property Description

Count

The number of cookies for this session. (Long, Read-Only)

Item

A cookie in the collection. Access using Collection.Item(CookieName). See above. (Cookie, Read/Write)



Crystal Decisions, Inc.
http://www.crystaldecisions.com
Support services:
http://support.crystaldecisions.com