LassoScript Utility
Basics Browse Detail


Tag Link [Cookie] Category Utility
Type Substitution Source Available No
Support Preferred Version 3.0
Change Unchanged Data Source Any
Output Type String Security None
Implementation LCAPI Sets Lasso 8.5, Lasso 8.0, Lasso 7.0, Lasso 6.0, Lasso 5.0, Lasso 3.x


[Cookie] returns the value for a named cookie. Accepts one required parameter, the name of the cookie whose value should be returned.

Note: A cookie's value cannot be retrieved in the same format file in which it is set.

Cookies are sent to the Web server by the visitor's Web browser. The availability of cookies is determined by the visitor's Web browser preferences and the parameters which are specified when a cookie is set.

It is not usually possible to retrieve a cookie that was set on another Web server.


[Cookie: 'Cookie Name']


Required Parameters
Cookie Name Name of the cookie to be returned.
Optional Parameters
Encoding Keyword Specifies the encoding for the tag's return value. Tags are encoded using -EncodeHTML by default if their value is output on a format file. No encoding is applied to nested tags unless an explicity encoding keyword is specified. One of -EncodeBreak, -EncodeHTML, -EncodeNone, -EncodeRaw, -EncodeSmart, -EncodeStrictURL, -EncodeURL, -EncodeXML.


To retrieve the value for a cookie:

Use the [Cookie] tag. The following example retrieves the value for a cookie called First_Name.

[Cookie: 'First_Name']