title: Prevent users from opening multiple instance of same website
body: <p>I need help with PHP and JS scripting on web.</p>
  
  <p>What I'm trying to do is something like a shopping cart. The product info is passed through the url paramaters and stored into SESSIONS in PHP. (Eg. <a href="http://www.mysite.com/pid=13" rel="nofollow">http://www.mysite.com/pid=13</a>)</p>
  
  <p>If the user opens a new tab in browser and loads <a href="http://www.mysite.com/pid=25" rel="nofollow">http://www.mysite.com/pid=25</a>, the second tab will show the updated cart with 2 items, but the first tab will only show 1 item unless I manually refresh it.</p>
  
  <p>What I need is:</p>
  
  <ol>
  <li>When the user visits my site on the first time, information will be loaded.</li>
  <li>When the user opens another instance of the same site (same url) on the browser (eg new tab), the second instance will be closed and the first instance will be refreshed to load some updated information.</li>
  </ol>
  
  <p>In simple terms, I do not want the user to open multiple instance of my site in the same browser by force closing the second tab and refreshing the first tab. Is there any way I can do this using a combination of PHP and JS?</p>