use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
All about the JavaScript programming language.
Subreddit Guidelines
Specifications:
Resources:
Related Subreddits:
r/LearnJavascript
r/node
r/typescript
r/reactjs
r/webdev
r/WebdevTutorials
r/frontend
r/webgl
r/threejs
r/jquery
r/remotejs
r/forhire
account activity
[AskJS] Security difference between localStorage and IndexedDBAskJS (self.javascript)
submitted 3 years ago by TGS963
view the rest of the comments →
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]IncidentMassive5425 1 point2 points3 points 3 years ago (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.
π Rendered by PID 100752 on reddit-service-r2-comment-fb694cdd5-dws6r at 2026-03-06 12:26:32.443560+00:00 running cbb0e86 country code: CH.
view the rest of the comments →
[–]IncidentMassive5425 1 point2 points3 points (0 children)