Core Docs | Additional Modules Docs

sb.cookies


@Description: Used to handle cookies - which can set values between client visits
@File: cookies.js
@Author: Paul Visco
@Version: 1.3 07/08/08

sb.cookies.clear


@Description: Used to make the clients computer forget a cookie
@File: cookies.js
@Param: String name The name (key) of the cookie which will be forgotten
@Example:
sb.cookies.clear('myCookie');

sb.cookies.clearAll


@Description: Clears all cookies stored for your domain
@File: cookies.js
@Example:
sb.cookies.clearAll();

sb.cookies.forget


@Description: Alias for sb.cookies.clear to maintain backwards compat
@File: cookies.js
@Param: String name The name (key) of the cookie which will be forgotten
@Example:
sb.cookies.forget('myCookie');

sb.cookies.forgetAll


@Description: Forgets all cookies stored for your domain
@File: cookies.js
@Example:
sb.cookies.forgetAll();

sb.cookies.set


@Description: Used to make the clients computer set a value as a cookie
@File: cookies.js
@Param: String name The name (key) of the cookie which will hold the valuee
@Param: String value The value the cookie holds, set cookies are limited to <4k
@Param: Days number The number of days to rememeber the value for. If not set they become session cookies and expire when the user closes the browser
@Example:
sb.cookies.set('name', 'paul');
    sb.cookies.set('name', 'paul', 30);

sb.cookies.unset


@Description: Alias for sb.cookies.clear to maintain backwards compat
@File: cookies.js
@Param: String name The name (key) of the cookie which will be forgotten
@Example:
sb.cookies.forget('myCookie');

sb.cookies.get


@Description: Used to get cookie values
@File: cookies.js
@Param: String name The name of the cookie who's value you are trying to get
@Return: String Returns the value stored for the cookie or false if the cookie is not found
@Example:
sb.cookies.get('myCookie', 'paul');