3 ms·
What would make it "more innocent"?
by jefftk 4y ago
What would make it "more innocent"?
- gkbrk 4y agoPerhaps the comment was about HttpOnly which cannot be read by random ad / tracking scripts on the page. It is still storing data, but now the server needs to actively transmit it to other parties.
- legitster 4y agoA cookie is a tiny plaintext file limited at 4kb. Your browser keeps an inventory of them, lets you read or delete them, and automatically clears them out regularly. Local storage can contain just about any type of user data without letting users know, and theoretically forever. If you have to store local data, and you cared about "innocence" (author's word), it seems to me a cookie set to the local domain leaves less room for shenanigans. Hence why Google probably disables it when you disable cookies as well.
- potatoz2 4y agoLooks like local storage has a max size of 5MB and cookies 180 * 4KB = 0.7MB, so a similar order of magnitude. AFAIK, cookies can be set to expire in hundreds of years by sites and local storage can be cleared the same way as cookies.
- legitster 4y agoI mean, you can make a cookie that is anything you want, but browsers accept what they accept. For Chrome that's a <4kb cookie with a max-expiration of 400 days. I think localStorage being slightly better or worse than a local cookie is up for discussion. I just think you're weird if you think local cookies are bad but localStorage is good.