Every time localStorage comes up, people say “don’t use it, use IndexedDB, it’s bad,” etc. I get the concerns, but in my case I’m just storing things like a theme preference and a couple of UI flags. No sensitive data, nothing critical. localStorage feels like the simplest option here, but it almost feels like I’m doing something wrong by using it.
Is most of the hate just about people misusing it as a database? Or are there real downsides even for small key/value stuff like this? Also, when would you pick sessionStorage instead?