express-example/public/js/cookies.js
function (sKey, sPath) {
      if (!sKey || !this.hasItem(sKey)) { return false; }
      document.cookie = encodeURI(sKey) + '=; expires=Thu, 01 Jan 1970 00:00:00 GMT' + (sPath ? '; path=' + sPath : '');
      return true;
    }
function (sKey, sPath) {
      if (!sKey || !this.hasItem(sKey)) { return false; }
      document.cookie = encodeURI(sKey) + '=; expires=Thu, 01 Jan 1970 00:00:00 GMT' + (sPath ? '; path=' + sPath : '');
      return true;
    }
function ( sKey , sPath ) { if ( ! sKey || ! this . hasItem ( sKey ) ) { return false ; } document . cookie = encodeURI ( sKey ) + '=; expires=Thu, 01 Jan 1970 00:00:00 GMT' + ( sPath ? '; path=' + sPath : '' ) ; return true ; }
Delete a cookie

### Syntax

Cookies.removeItem(name[, path])

### Example usage

Cookies.removeItem('test1');
Cookies.removeItem('test5', '/home');

### Parameters

@param sKey - name - the name of the cookie to remove (string).
@param sPath - path (optional) - e.g., "/", "/mydir"; if not specified, defaults to the current path of the current document location (string or null).
@returns {boolean}
Delete a cookie