title: How to share an object between two pages?
body: <p>I wrote a simple JS script to create an object that permit the inizialization of only one instance. If the object is already inizialized it return is without recreate it again.</p>
  
  <p>This is my: <strong>myobj.js</strong></p>
  
  <pre><code>var Singleton = {
  
    initialized : null,
  
    init: function(){
  
      console.log("new obj...");
  
      this.initialized = {
        'status' : 'initialized'
      }
  
    },
  
    getInstance : function(){
  
      if (!this.initialized) this.init();
  
      return this.initialized;
  
    }
  
  }
  </code></pre>
  
  <p>Then I have create a test.html page to test this script:</p>
  
  <pre><code>&lt;script src="myobj.js"&gt;&lt;/script&gt;
  
  &lt;script&gt;
  var uno = Singleton.getInstance();
  var due = Singleton.getInstance();
  
  (uno===due) ? console.log("equals") : console.log("not equals");
  &lt;/script&gt;
  </code></pre>
  
  <p>All works good, only one object is created.</p>
  
  <p>My question is: can I share this object "Singleton" between more HTML pages?</p>
  
  <p>without recreate it in different pages?</p>
  
  <p>If I have (for example) 100 tabs opened on the browser, I would like to use the same object without having the same 100 objects.</p>
  
  <p>Thank you!</p>