API/libsapojs/SAPO/Utility/Cookie

[Elements] are optional

Class SAPO.Utility.Cookie


class SAPO.Utility.Cookie
Utilities for Cookie handling
Defined in Utility/Cookie/0.1/lib.js

Function Summary
Object get()
Gets an object with current page cookies
remove (String cookieName)
Delete a cookie with "cookieName"
set (String name, String value, [Number expires], [String path], [String domain], [Boolean secure])
Sets a cookie

Function Details

function get

Object get()
Gets an object with current page cookies
Returns:
Cookies object name => value

function remove

remove(String cookieName)
Delete a cookie with "cookieName"
Parameters:
cookieName

function set

set(String name, String value, [Number expires], [String path], [String domain], [Boolean secure])
Sets a cookie
Parameters:
name - cookie name
value - cookie value
[expires] - number to add to current Date in seconds
[path] - path to sets cookie (default '/')
[domain] - domain to sets cookie (default current hostname)
[secure] - true if wants secure, default 'false'