title: $window.sessionStorage vs $cookieStore
body: <p>What is the difference between using $cookieStore and &amp;window.sessionStorage?  Are there times when one should be used over the other?  Security Issues?</p>
  
  <p>Here is what I know so far:</p>
  
  <p>The AngularJS docs state that the $cookieStore service is backed by "session cookies" (<a href="https://docs.angularjs.org/api/ngCookies/service/" rel="nofollow noreferrer">https://docs.angularjs.org/api/ngCookies/service/</a>$cookieStore).  So, it appears that information stored with $cookieStore is tied to the window/tab where it is used.  This is affirmed by the use of the mysterious $browser service in the code for $cookieStore: <a href="https://github.com/angular/angular.js/blob/master/src/ngCookies/cookies.js#L125" rel="nofollow noreferrer">https://github.com/angular/angular.js/blob/master/src/ngCookies/cookies.js#L125</a>.</p>
  
  <p>However, since $browser is an internal service and subject to change, I can't see how it is storing the data, to see if it is similar to sessionStorage.</p>
  
  <p>The same browser/tab/window scope seems to apply to $window.sessionStorage (<a href="https://stackoverflow.com/questions/9742395/scope-of-sessionstorage-and-localstorage?rq=1">Scope of sessionStorage and localStorage</a>).</p>