title: Vue: shared data between different pages
body: <pre><code>var app = new Vue({
      el: '#app',
      data: {
          sharedData : ""
      },
  
      methods: {
          goToPageB: function() {
               if (some condition is met) {
                  window.location.href="pageB.html";
                  sharedData = 1234;  &lt;------- I want to access sharedData in page B as well
               } 
  
          } 
      }
  </code></pre>
  
  <p>I am new to Vue, i made a dummy login page and try to make my main page display sharedData according to the username. But the data is always lost after my app directs to Page B. How can I fix this?</p>