Hacker News new | ask | show | jobs
by potatoz2 1388 days ago
Looks 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.
1 comments

I 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.