title: Make cookie presistent even after browser shutdown/restart using Angular.js
body: <p>I am using Angular for my project, and got into a problem with authentication. On successfull authentication user retrive a token from server, and as long user have this token he can access all the places where he need authentication (i thought its a best way to do this since i use MVC web API as backend, and i dont have sessions). Everything works fine, until i close down my browser, and start it up again $cookieStore and $cookies are empty after restart. </p>
  
  <p>Does anyone have any idea how to make cookie presistent, or are there any smarter way of doing this? </p>
  
  <p>Ive created a test controller with a testview where i have 2 buttons which set and load $cookie before restart it works, if i open a new window while the other one is still up its works too, but as soon i close everything down, coockies is empty. </p>
  
  <pre><code>    $scope.Set = function () {
  
      $scope.LoadedData = "test";
      $cookies.myFavorite = 'oatmeal';
  
  }
  
  
  $scope.Load = function () {
  
      var b = $cookies.myFavorite;
      console.log("testasdasd" + $cookies);
  
      $scope.LoadedData = $cookies.myFavorite;
  
  }
  </code></pre>