title: How to carry a unique identifier across multiple web pages
body: <p>I have created a simple website for my own use that consists of 3 static pages. Each page loads some data from a database (parse server) that allows me to either view or manipulate said data. This works great but now I want to expand it to select specific data based on an identifier (<code>dataid</code>).</p>
  <p>Assuming I go to a landing page and then select (e.g. from a dropdown) the dataset, by name, I want to view/edit which gives the <code>dataid</code>, how do I use that <code>dataid</code> across any of the 3 pages I have?</p>
  <p>I thought about using localStorage but that is common for a given domain/port and I may want multiple tabs open each showing a different set of data (different <code>dataid</code>).</p>
  <p>And I think sessionStorage is not the correct solution either since it only persists per tab and I'd like to be able to have multiple tabs open related to the same <code>dataid</code>.</p>
  <p>I think it might be related to query strings but I am not sure how to use that across all pages. For example, assume from the landing page user selects <code>dataid='dataset1'</code> and the landing page opens <code>main.html?dataset1</code>. But if <code>main.html</code> contains a link to <code>edit.html</code> how would I get it to open <code>edit.html?dataset1</code>? I have seen some solutions where all links on a page are modified using jQuery/javascript to append the query string; but this feels more like a workaround.</p>
  <p>I know this is used all over the web but not sure how they achieve it. For example, I am sure I have seen things like:</p>
  <pre class="lang-html prettyprint-override"><code>somedomain.com/{dataid}/main.html
  somedomain.com/{dataid}/edit.html
  </code></pre>
  <p>This feels like what I am looking for and means I have a user friendly url to a given dataset. Is this some sort of server side handling? If so, what technology is in use here?</p>
  <p>I'd be interested in either a server side solution if that is the 'correct' way to do it and, short term, a client side solution (as I currently use neocities to serve my static pages).</p>
  <p>Clarification of requirements:</p>
  <ol>
  <li>For a given browser tab, be able to load any of the 3 pages with a specific <code>dataid</code>.</li>
  <li>Be able to have multiple tabs open, each using their own <code>dataid</code>.</li>
  <li>Any of the linked pages should continue with the current <code>dataid</code>. e.g. if main.html links to edit.html, then if user click on the link to edit.html (either open in current tab or new tab), then edit.html should continue with the same <code>dataid</code>.</li>
  <li>Be able to link directly to a given <code>dataid</code> - e.g. main.html?dataset1 or similar (its OK if I need to add JS to extract the <code>dataid</code> before continuing).</li>
  </ol>
  <p>A thought that I had is, perhaps some of this maybe easier/only possible with a single page web app??</p>