cookie

Contains utility functions for handling the cookie with the given key.

Parameters

  • key String
    The identifying name of the cookie.

Returns

Object
A ProBoards cookie object that can be used to call a number of utility functions.

Methods:

get
set

Direct Link

get

( )
Returns the value in this cookie.

Returns

Object
The cookie's data.

Direct Link

set

( value, [options] )
Sets the value of this cookie.

Parameters

  • value String
    The value to which to set this cookie.
  • [options] Object Optional
    Additional options:
    • [expires] String|Number|Date Optional
      Must be either the string 'never', a number of days, or a JavaScript Date object.
    • [path] String Optional
      The cookie's path.
    • [domain] String Optional
      The cookie's domain.
    • [secure] Boolean Optional
      True means the cookie will be marked 'secure'.
      Defaults To: false

Returns

String
A string representation of the cookie.