title: Chrome - LocalStorage - Storing Values Across All URLs
body: <p>I am developing a Chrome Extension where the user needs to be authenticated with our server every time they use the extension. I am trying to implement the 'Remember Me' feature where once the user has entered in the credentials, the extension will remember it forever. The problem I have come across is that Chrome will associate the credentials with the current website the user is on.</p>
  
  <p>Right now, if the user enters in their credentials on google.com, the system will only remember their credentials on google.com, and not wikipedia.org. What I want to happen is that their credentials will be remembered across all domains.</p>
  
  <p>To read the credentials:</p>
  
  <pre><code>username = localStorage["username"];
  password = localStorage["password"];
  </code></pre>
  
  <p>To store the credentials:</p>
  
  <pre><code>localStorage["username"] = username;
  localStorage["password"] = password;
  </code></pre>
  
  <p>To check if their credentials exist:</p>
  
  <pre><code>if ( localStorage["username"] != "" ) {...}
  </code></pre>