title: cross domain localstorage with javascript
body: <p>We have a javascript api.js which is hosted on domain api.abc.com. It manages the local storage.</p>
  
  <p>We included this javascript in our websites at abc.com and login.abc.com as a cross domain js like </p>
  
  <pre><code>&lt;script src="http://api.abc.com/api.js"&gt;
  </code></pre>
  
  <p>I understand that localstoarge is per domain basis. However since api.js is loaded from api.abc.com, I expected that it will have access to local storage of api.abc.com from both the domains. Unfortunately, it doesn't seem to be the case. When api.js stores a value in localstoarge from one domain, it's not accessible to it when loaded from other domain. </p>
  
  <p>Any idea?</p>