title: How to restrict my app to a single browser tab?
body: <p>Frankly, it's just causing too much hassle in in v1.0 to have a functionality which requires three form submissions, with <code>$_SESSION</code> session data holding all of the intermediate stuff - only to have a user start an operation, then open a second tab and perform a second operation which tramples over the session data.</p>
  
  <p>I doubt that this is malicious (but can’t discount it). More likely the user starts an operation, gets interrupted, forgets that they started or can’t find the original tab so starts again (then later finds the original tab and tries to complete the operation a second time).</p>
  
  <p>Since I am coding in PHP I can detect the existence of session data on form submission (how would I do that with JS if the user as much as opens another tab – I guess that I would need Ajax – right?).</p>
  
  <p>So, each time I start an operation I check for a flag in session data and if set I reload to a “I’m sorry, Dave.  I’m afraid I can’t do that” page, else I set the flag and continue (remembering to clear it at the end of the operation).</p>
  
  <p>I guess that that would work, but:<br>
      1)  Is it acceptable to restrict browser apps to a single tab/instance?<br>
      2)  Should I attempt to allow multiple instances in v2.0 ?</p>
  
  <p>Any other comments, help or advice?</p>