Cookie

Provide Cookie utilities.

defined in: cookie.js

Namespace

Methods

  • Cookie. get (name) <static> Returns the cookie value for given name
  • Cookie. remove (name, domain, path, secure) <static> Remove a cookie from the machine by setting its expiration date to sometime in the past
  • Cookie. set (name, val, expires, domain, path, secure) <static> Set a cookie with a given name and value

Namespace Detail

  • Cookie
    Provide Cookie utilities.

Methods Detail

  • Cookie. get (name) <static> view source
    Returns the cookie value for given name
    Parameters
    •   name
    Returns
    • {String} name The name of the cookie to retrieve
  • Cookie. remove (name, domain, path, secure) <static> view source
    Remove a cookie from the machine by setting its expiration date to sometime in the past
    Parameters
    •   name {String} The name of the cookie to remove.
    •   domain {String} The cookie's domain
    •   path {String} The cookie's path
    •   secure {String} The cookie's secure option
  • Cookie. set (name, val, expires, domain, path, secure) <static> view source
    Set a cookie with a given name and value
    Parameters
    •   name {String} The name of the cookie to set
    •   val {String} The value to set for cookie
    •   expires {Number|Date} if Number secified how many days this cookie will expire
    •   domain {String} set cookie's domain
    •   path {String} set cookie's path
    •   secure {Boolean} whether this cookie can only be sent to server on https
blog comments powered by Disqus
Top