title: Cookie to check if user has been before if not then redirected to home page
body: <p>Hi 
  I’m trying to use the following cookie to force users to go to my homepage first no matter what link they come to me from (I know a lot of people frown upon this but it’s something i wish to do) if they haven't been to my homepage before:</p>
  
  <p>I have the following code on my home page between the “head” tags:</p>
  
  <pre><code>$.cookie(“seenhp”, true, { expires: 365 });
  </code></pre>
  
  <p>And the following code on every other page between the “head” tags again:</p>
  
  <pre><code>if (!$.cookie(“seenhp”)) location.assign(“/index.php”);
  </code></pre>
  
  <p>It doesn’t seem to be working am i missing something very obvious?</p>