title: Best way to store shopping cart details localstorage or server side cookies
body: <p>I'm currently developing a e-commerce site which is going to have around 500 items. I need the site to be supported by IE8+, Firefox, chrome.</p>
  
  <p>The users of the site should be able to add the items to the cart even without login. once they login they should see the items in their cart which were added by them before login in the same browser. There is NO necessity that the cart items added in a browser has to be mapped to a user account or accessible across the devices where the user login.</p>
  
  <p>Given these requirements, what is the best way to store the cart items, localstorage or serverside HTTP cookies ?
  Also need some inputs on the security issues(like xss..) which might arise on using localstorage, if there are any</p>