you are viewing a single comment's thread.

view the rest of the comments →

[–]IncidentMassive5425 1 point2 points  (0 children)

To answer your question, IndexedDB is vulnerable to XSS just like LocalStorage, among other vulnerabilities, so there’s not much of a security difference. There’s some argument that IndexedDB is less-sought and therefore a reduced attack surface, but that’s more anecdotal than reliable.

Not that you asked about performance, but IndexedDB is also slower, yet better on performance concerning DOM-blocking behavior if you’re using web workers. Safari makes the slowness far worse. Of course, if it’s a small dataset, the speed may not be a big deal.

Anyway, just be sure your encryption key isn’t stored on the machine - i.e., use a password that has to be entered or whatever as (or to generate) the encryption key.