Class jls.util.Cookie
Cookie utility class.
Defined in: Cookie.js.
Class Summary
| Constructor Attributes |
Constructor Name and Description |
| |
|
Method Summary
| Method Attributes |
Method Name and Description |
| <static> |
Returns all cookies.
|
| <static> |
jls.util.Cookie. clear(name)
Clears a cookie depending on its name.
|
| <static> |
jls.util.Cookie. get(name)
Returns a cookie depending on its name or null if there is no cookie for this name.
|
| <static> |
jls.util.Cookie. set(name, value, opts)
Sets a cookie.
|
Class Detail
jls.util.Cookie()
Method Detail
<static>
{Object}
jls.util.Cookie.all()
Returns all cookies.
- Returns:
- {Object} The cookies.
<static>
jls.util.Cookie.clear(name)
Clears a cookie depending on its name.
- Parameters:
-
{String} name
- The name of the cookie to get.
<static>
{String}
jls.util.Cookie.get(name)
Returns a cookie depending on its name or null if there is no cookie for this name.
- Parameters:
-
{String} name
- The name of the cookie to get.
- Returns:
- {String} The value or null if there is no cookie for this name.
<static>
jls.util.Cookie.set(name, value, opts)
Sets a cookie.
The expiration date tells the browser when to delete the cookie.
The domain and path tell the browser that the cookie has to be sent back to the server when requesting URLs of a given domain and path.
If not specified, they default to the domain and path of the object that was requested.
As a result, the domain and path strings may tell the browser to send the cookie when it normally would not.
For security reasons, the cookie is accepted only if the server is a member of the domain specified by the domain string.
A secure cookie is only used when a browser is visiting a server via HTTPS.
- Parameters:
-
{String} name
- The name of the cookie to set.
-
{String} value
- The value.
-
{Object} opts
Optional
- The options.
-
{Date} opts.expires
Optional
- The expiration date.
-
{String} opts.domain
Optional
- The domain.
-
{String} opts.path
Optional
- The path.
-
{String} opts.secure
Optional
- The secure.
Documentation generated by
JsDoc Toolkit 2.3.2 on Mon Jan 17 2011 23:59:13 GMT+0100 (CET)