title: Idiomatic way to enforce single page app being used in one tab only
body: <p>I created let say quite complex application that uses IndexedDb heavily. After some investigation I found that this was truly a pain to accomplish. Only way I can think of is utilizing Web Storage (cross tab communication) to warn user that:</p>
  
  <p>a) he can't open another tab when another one is open</p>
  
  <p>b) if he continues the old tab will be closed</p>
  
  <p>but it is really ugly to bother user with it. The alternatives are :</p>
  
  <ol>
  <li>allowing multiple tabs and coordinate and synchronize stuff using a Web Storage or SharedWorker via shared context (far future), which means to literally program the multitab compliance (I don't have the resources to do so, imho it'd be quite hairy anyway)</li>
  <li>developing it as a chrome app, like Postman or <a href="https://github.com/GoogleChrome/chrome-app-samples/tree/master/samples/text-editor" rel="nofollow">this test editor</a></li>
  </ol>
  
  <p>Are there any other alternatives? How do you guys do it? I feel like the app complexity would grow too much if I don't enforce the "one tab only" way. It is not easy to secure every aspect of your app to work in multiple tabs.</p>