// https://developer.mozilla.org/en-US/docs/Web/API/Document/cookie

console.log('Any cookies yet? ' + document.cookie);

console.log('Setting a cookie...');

document.cookie = 'something=somethingelse';

console.log('OK set one: ' + document.cookie);

// https://developer.mozilla.org/en-US/docs/Web/API/Document/cookie


$(document).on('ready', function() {

  allCookies = document.cookie;

  if (allCookies === '') {
    $('hi').append('Welcome for the first time!');
    document.cookie = 'something=somethingelse';
  } else {
    $('hi').append('Welcome back!');
  }

})

Change messaging based on cookie
Change messaging based on cookie
