Namespace puredom.cookies
-
Handles storage and retrieval of cookies.
- Defined in: utils.js
| Constructor Attributes | Constructor Name and Description |
|---|---|
Method Summary
| Method Attributes | Method Name and Description |
|---|---|
| <static> |
puredom.cookies.
get
(key, useCached)
Get a cookie.
|
| <static> |
puredom.cookies.
purge
()
Remove all cookies and cached values
|
| <static> |
puredom.cookies.
remove
(key)
Remove a cookie and any cached values
|
| <static> |
puredom.cookies.
set
(key, value, days, domain, path, secure)
Set a cookie with name *key* to value *value*
|
Namespace Detail
puredom.cookies
Method Detail
-
<static> {String} puredom.cookies.get(key, useCached)Get a cookie. Pulls values from cache when possible.
- Parameters:
- {String} key
- The key to lookup
- {Boolean} useCached Optional, Default: true
- Use cached value if present
- Returns:
- {String} value The value, or
nullif the lookup failed.
-
<static> puredom.cookies.purge()Remove all cookies and cached values
-
<static> puredom.cookies.remove(key)Remove a cookie and any cached values
- Parameters:
- {String} key
- The key to remove
-
<static> puredom.cookies.set(key, value, days, domain, path, secure)Set a cookie with name *key* to value *value*
- Parameters:
- {String} key
- The key for storage
- {String} value
- A value to store
- {Number} days
- The cookie lifetime in number of days.
- {Any}domain
- {Any}path
- {Any}secure