title: How can I change my age verification to clear cookies every time a user enters my site?
body: <p>I am looking for a solution for my age check to display every time a user enters the site. Currently it is set to display once a day for a user. If they leave the site and comes back that day I need it display again. It is on Shopify.</p>
  
  <pre><code>           if ((today.getTime() - theirDate.getTime()) &lt; 0) {
       window.location = 'http://google.com'; //enter domain url where you would like the underaged visitor to be sent to.
     } else {
       var days = 1; //number of days until they must go through the age checker again.
       var date = new Date();
       date.setTime(date.getTime()+(days*24*60*60*1000));
       var expires = "; expires="+date.toGMTString();
       document.cookie = 'isAnAdult=true;'+expires+"; path=/";
       location.reload();
     };
  </code></pre>