Search:
Class o2.Cookie
static
class
o2.Cookie
Function Summary
Reads the value of the cookie with the given name.
Usage example:
var value = o2.Cookie.read('cookieName');
Removes a cookie.
Usage example:
o2.Cookie.remove('testCookie');
Function Details
function read
static
read(String
name)
Reads the value of the cookie with the given name.
Usage example:
var value = o2.Cookie.read('cookieName');
Parameters:
name
- the name of the cookie to
read.
Returns:
the value of the cookie; or
null
if the cookie is not found.
function remove
Removes a cookie.
Usage example:
o2.Cookie.remove('testCookie');
Parameters:
name
- the name of the cookie to
remove.
path
- (optional) the path of the cookie.
domain
- (optional) the domain of the cookie.
isSecure
- (optional) will the cookie be used for a
secure connection. function save
Saves a cookie.
Usage example:
o2.Cookie.save('testCookie', 'testValue', 10);
Parameters:
name
- the name of the cookie.
value
- the value of the cookie.
days
- (optional) how many days should the
cookie persist.
path
- (optional) the path of the cookie.
domain
- (optional) the domain of the cookie.
isSecure
- (optional) will the cookie be used for a
secure connection.
A cookie helper class.