Home > Contents > Index >
Template Tag TOC  |   Alpha TOC  |   Tag Family TOC  |   Purpose TOC  |   Annotated TOC  |   Index 

 

SETCOOKIE

Sets a cookie on the client.

Syntax

Parameters

NAME (required)
Name of the cookie to set.

VALUE (required)
Value of the cookie being set.

TIMEOUT (required)
Timeout value of cookie, in seconds. After the cookie has expired, it no longer exists.

SECURE (required)
Indicates whether security is set on this cookie. Possible values are "true" or "false".

URL (optional)
Valid URL. This value restricts the sending of the cookie from the client to this URL only.

DOMAIN (optional)
Valid domain name. This value restricts the sending of the cookie from the client to addresses in this domain only.

Description

The SETCOOKIE tag sets a cookie on the client. SETCOOKIE must appear before any tag that streams back data on the page or the cookie is not set. This is an HTTP requirement.

Note

When setting cookies it is preferable to use CookieServer rather than the SETCOOKIE tag.

errno

The possible values of errno include:

Value
Description
-202
Cannot send mail.

Example

This example sets the cookie mycookie on the client with the value frank. The cookie expires 600 seconds from the time it is created.

See Also

REMOVECOOKIE
SETCOOKIE

  Home > Contents > Index >

FatWire XML Tag Reference
Copyright 2005 by FatWire Software
All rights reserved.