LassoScript Utility
Basics Browse Detail

[Client_CookieList]

Tag Link [Client_CookieList] Category Client
Type Substitution Source Available Yes
Support Preferred Version 5.0
Change Unchanged Data Source Any
Output Type String Security None
Implementation LDML Sets Lasso 8.5, Lasso 8.0, Lasso 7.0, Lasso 6.0, Lasso 5.0

Description

[Client_CookieList] returns a string which contains every cookie sent along with the current HTTP request. Returns the empty string if no cookies are set.

This tag can be used to display all the cookies that are currently set to help debug solutions that rely on cookies.

The [Cookie] tag can be used to retrieve a single named cookie. The [Client_Cookies] tag can be used to return a pair array of all set cookies.

Syntax

[Client_CookieList]

Parameters

No Parameters Required.

Examples

To check whether a specific cookie was set in the current request:

Use the [Client_CookieList] tag to get a list of all cookies and scan it for the desired cookie name. The following code checks to see if a cookie named Username is set.

[If: (Client_CookieList) >> 'Username']
  <br>Username cookie is set.
[/If]

<br>Username cookie is set.