Hacker News new | ask | show | jobs
by frankpf 2493 days ago
Using a cookie is not a benefit, it's a downside. You have to deal with CSRFs, which aren't possible with localStorage.
1 comments

But then you open yourself up to XSS which is a lot harder to defend against.
You don't open yourself up to XSS, see my comment above: https://news.ycombinator.com/item?id=20773188