title: Chrome losing cookies
body: <p>I am getting a error on my live site which i am not seeing on my Dev environment and it seems to only happen with Chrome. I have looked around a bit for a solution to this and i find issues only with the Auth cookie. (I actually raised an issue about chrome and the auth cookie in the past) but this is different.</p>
  
  <p>I store the users cart in a cookie. I set the cookie like so</p>
  
  <pre><code>HttpCookie responseCookie = HttpContext.Response.Cookies[CartHelper.CART];
  responseCookie.PackCartCookie(vm.Cart);
  </code></pre>
  
  <p>Where the extension method PackCartCookie set the cookie value like so</p>
  
  <pre><code>cookie.Value = HttpUtility.UrlEncode(cookieValue);
  </code></pre>
  
  <p>This results is a cookie being stored with the following settings</p>
  
  <ul>
  <li>Domain = www.foo.com</li>
  <li>RawSize = 230b</li>
  <li>Path = /</li>
  <li>Expires = Session</li>
  <li>HttpOnly = HttpOnly</li>
  <li>Value = Encrypted</li>
  </ul>
  
  <p>When a user is interacting with the site it seems that the Cart Cookie is being created but it  is being lost or dropped from time to time. When i look at the Elmah error and review HTTP_COOKIE I can see all the other cookies (I have others set in the same way which function fine) but i do not see the cart cookie.</p>
  
  <p>I have had to change code to be more defensive because of this issue. But as you can imagine the cart cookie is used through out the purchase process and i have had fails when responding to a purchase where i accept payment but the system crashes as the cart is gone and the user is not notified of a successful buy. Luckily i caught this early and refunded users affected.</p>
  
  <p><strong>User Agents where I have seen the issue</strong></p>
  
  <ul>
  <li>Mozilla/5.0 (X11; Linux i686) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/29.0.1547.62 Safari/537.36</li>
  <li>Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/29.0.1547.57 Safari/537.36</li>
  <li>Mozilla/5.0 (Windows NT 6.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/29.0.1547.62 Safari/537.36</li>
  </ul>