title: Refreshing a page with javascript using php header('location')
body: <p>I want use a single php file to handle all of my voting requests. </p>
  
  <p>Currently the script will, if <code>siteType</code> isn't set, forward the user and display a message. If the user has <code>JS</code> on then it will return a json object and ajax the page. </p>
  
  <pre><code>        if(!isset($_COOKIE['siteType'])){
              displayMessages('bad', 'Before you can continue you must select which category you would like to be in.');
              header('Location:/');
              exit;
          }
  </code></pre>
  
  <p>I need it as that if this php code above is executed the page will reload, i assume with javascript and reading the http headers?</p>
  
  <p><strong>[Edit]</strong> 
  I didn't make myself clear enough, but this is a ajax request. I don't output any html. So this really is just about getting js to handle the header?</p>