title: csrf hash token behaviour when website is open in multiple tabs
body: <p>I am trying to integrate a method to add a hash token to every form in my application. I want to achieve to goals with this:</p>
  
  <ol>
  <li>Prevent csrf attacks</li>
  <li>Prevent that a form gets resubmitted when the user reloads a page after submitting a form</li>
  </ol>
  
  <p>Now, the concept in doing this should be simple enough I thought:</p>
  
  <ul>
  <li>I generate a unique hash and save it to the cookie</li>
  <li>I create a hidden field in the form with the generated hash</li>
  <li>before processing the $_POST data from the form I verify that the hash value from the form matches the one from the cookie.</li>
  </ul>
  
  <p>So far so good, now what where I really get stuck is the following scenario:</p>
  
  <p>What if a user opens another tab with with my application. Everytime the page gets loaded the hash value gets regenerated. Thus rendering the hash value from the form in the first tab invalid.</p>