title: JavaScript persist a search query through out the whole site
body: <p>I'm currently fetching a query (e.g, <code>http://localhost:49781/HTML/index.html?inputName=Marcus</code>) from a html form using this following JavaScript:</p>
  
  <pre><code>function setSignedName() {
      if (window.location.search.indexOf("=") &gt;= 0) {
          var split = window.location.search.split("=");
          document.getElementById("signed_in_name").innerHTML += split[1];
      } else {
          document.getElementById("signed_in_name").innerHTML = "Not signed in";
      }
  </code></pre>
  
  <p>running the script will get the result: Marcus. </p>
  
  <p>I want this string to be persisted through out my site, so when the user navigates to another page the inputName will still be Marcus.</p>
  
  <p>What is the best way of achieving this? </p>
  
  <p>Edit: This approach is only for display/non-production use, I know using a server side language like PHP is the best approach. </p>