Home
The Toolkit for Online Communities
15898 Community Members, 1 member online, 2326 visitors today
Log In Register

ad_set_cookie

OpenACS Home : ACS API Browser : ad_set_cookie

ad_set_cookie (public)

ad_set_cookie [ -replace replace ] [ -secure secure ] \
    [ -expire expire ] [ -max_age max_age ] [ -domain domain ] \
    [ -path path ] name [ value ]
Defined in packages/acs-tcl/tcl/utilities-procs.tcl

Sets a cookie.

Switches:
-replace (defaults to "f") (optional)
forces the current output headers to be checked for the same cookie. If the same cookie is set for a second time without the replace option being specified, the client will receive both copies of the cookie.
-secure (defaults to "f") (optional)
specifies to the user agent that the cookie should only be transmitted back to the server of secure transport.
-expire (defaults to "f") (optional)
specifies whether we should expire (clear) the cookie. Setting Max-Age to zero ought to do this, but it doesn't in some browsers (tested on IE 6).
-max_age (optional)
specifies the maximum age of the cookies in seconds (consistent with RFC 2109). max_age inf specifies cookies that never expire. The default behavior is to issue session cookies.
-domain (optional)
specifies the domain(s) to which this cookie applies. See RFC2109 for the semantics of this cookie attribute.
-path (defaults to "/") (optional)
specifies a subset of URLs to which this cookie applies. It must be a prefix of the URL being accessed.
Parameters:
name
value (optional) - is autmatically URL encoded.

See Also:
[ show source ]
Show another procedure: