4.58. read-cookie
Returns the value of the named cookie. Returns nothing if the cookie does not exist.
4.58.1. Summary
[read-cookie name] [read-cookie name=mycookie]
Attributes | Description | Default |
name | The name of the cookie whose value you want | none |
Attributes | Default |
interpolate (reparse) | No |
Other_Characteristics | |
Invalidates cache | Yes |
Container tag | No |
Usage example:
[read-cookie name=MV_SESSION_ID] --- 6CZ2whqo
ASP-like Perl call:
$Tag->read_cookie( { name => $name, } );
or similarly with positional parameters,
$Tag->read_cookie( $name );
4.58.2. Description
This tag expands to the value of the named cookie (or nothing if the cookie does not exist).
See the Netscape specification at http://www.netscape.com/newsref/std/cookie_spec.html if you need more cookie-specific detail.
4.58.2.1. name
This is the name of the cookie whose value you want to retrieve.
4.58.2.2. Parsing an HTTP_COOKIE string
If you pass this tag a second parameter within a Perl call, it will use your value as the HTTP_COOKIE string (ignoring the real one). This only applies if you pass the values positionally within a perl call since there is no name for the HTTP_COOKIE string input:
$Tag->read_cookie('MV_SESSION_ID', "MV_SESSION_ID=UnHyaDQj:127.0.0.1; ...");