Y
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
rdegges
2493 days ago
But then you open yourself up to XSS which is a lot harder to defend against.
link
frankpf
2493 days ago
You don't open yourself up to XSS, see my comment above:
https://news.ycombinator.com/item?id=20773188
link