
 |
 |
WebGroove is no longer supported. These docs are reference only. |
|

|

Cookie Tag
Sets a client-side cookie of the specified name.
Except for sethash, these parameters adhere to the somewhat official cookie specifications. The Agent supports multi-valued cookies with embedded name=value pairs. To delete a cookie, give it an empty value.

You can get cookie values from within any Agent script in one of two ways. Let's say the cookie is named 'user'. Referencing {cookie:user} will get you the raw value. If you used name=value pairs within your cookie definition, you can get at the individual values by referencing {user:name}, {user:age}, etc.
 Important
To be effective, this tag must appear before the standard <html> tag and any Agent content tag.
 Examples
<cookie name=user_prefs path=/ secure>
 |
id={user:id}
detail={user:detail_level}
last={user:last_request}
|
</cookie>
 <cookie name=dead_cookie path=/></cookie>
 <cookie name=stuff path=/stuff expires="08/14/2001" path=/ sethash>
 |
This is a whole bunch of stuff the user
wanted in their cookie for some reason.
|
</cookie>
 Syntax
This is a paired tag with some required and optional attributes.

| Attributes |
| name= | Gotta name your cookies. |
| domain= | Specify the domain this cookie should be restricted to. Defaults to the domain that sets the cookie. Rarely used. |
| expires= | When the cookie should go stale. |
| secure | Used for setting secure cookies that will work with the secure socket layer. |
| sethash | To have a cookie hash filled when you set a cookie, specify the sethash bareword. Normally, cookie hashes are only filled when your script receives a cookie that is already set. |
 Caution
A lot of talk and press has been devoted to the potential dangers of cookies. While much of the scare has been drenched with paranoia, you should be sensible with cookie data by storing anonymous and innocuous information. We recommend storing extended information on your server with a single "ID" key to identify a user. If you allow users to see or modify sensitive information do not rely on cookie or single ID information. Make them "login" in some way each time you hand out private information. For added security you may consider using the secure socket layer (SSL).
 See Also
 Content Tag
 Up To
 Agent Tags
 Complete Tag Reference
 WebGroove® is a registered trademark of Creativision Publishing Corporation
|
 |
 |
 |
|

|