Util.cookieWrite

Writes a value to a cookie.

Syntax:

s.Util.cookieWrite(key, value [,expire])

Parameters:

Parameter Description
key (required) key to write value for in cookies.
value (optional) value to write to cookies.
expire (optional) Date object containing the expiration date for the cookie. Default is to use a session cookie.

Returns:

Example:

//set a cookie with an expiration 6 months from now
var date = new Date();
date.setMonth(date.getMonth() + 6);
var success = s.Util.cookieWrite("my_cookie", "my_value", date);