Skip to content

cookieHandler create

Mike Byrne edited this page Jan 25, 2022 · 2 revisions

description

Creates a cookie with optional expiration date

requires

  • nothing

parameters

  • name - required - name of cookie
  • value - required - value of cookie
  • days - optional - expiry time, in days. If non specified the cookie expires when the browser window is closed

returns

  • nothing

example usage:

import { cookieHandler } from '@area17/a17-helpers';

cookieHandler.create('splash',true,1);

thanks to

http://www.quirksmode.org/js/cookies.html