Docs Home

sb.cookies

@File: /surebert/cookies.js

@Author: Paul Visco

@Version: 1.3 07/08/08

@Description: Used to handle cookies - which can set values between client visits

sb.cookies.forget

@File: /surebert/cookies.js

@Description: Used to make the clients computer forget a cookie


@Param: String name The name (key) of the cookie which will be forgotten
@Example:

    sb.cookies.forget('myCookie');
    

sb.cookies.forgetAll

@File: /surebert/cookies.js

@Description: Forgets all cookies stored for your domain


@Example:

    sb.cookies.forgetAll();
    

sb.cookies.get

@File: /surebert/cookies.js

@Description: Used to get cookie values


@Param: String name The name of the cookie who's value you are trying to get
@Returns: String Returns the value stored for the cookie or false if the cookie is not found
@Example:

    sb.cookies.get('myCookie', 'paul');
    

sb.cookies.set

@File: /surebert/cookies.js

@Description: Used to make the clients computer set a value as a cookie


@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);