title: select users who currently view same page
body: <p>I find several partial solutions in answers on this question, but common answer seems to be absent.
  So, I have a table users with columns user_id, user_name. On each static page of website I want to display all user names of users who currently view this page.</p>
  
  <ol>
  <li>Should I have a table views with columns user_id, webpage_link?</li>
  <li>If yes, when I shall update data in column webpage_link? How to connect code from following answer with mysql database <a href="https://stackoverflow.com/questions/1060008/is-there-a-way-to-detect-if-a-browser-window-is-not-currently-active">Is there a way to detect if a browser window is not currently active?</a> ? (If it is ok for this purpose.)</li>
  <li>To make updates very often is not very good. So, the user can view several pages (for example, in 2 or more tabs). What type of webpage_link column shall be in this case?</li>
  </ol>