Re:IndexedDB is completely broken in latest Safari
by tofukid on Tuesday June 15, 2021 @05:29AM
(#27512971)
What do you need IndexedDB for?
[ Parent
| on HN ]
Re:IndexedDB is completely broken in latest Safari
by feross on Tuesday June 15, 2021 @12:20PM
(#27517640)
Wormhole.app uses peer-to-peer transfer to send your files directly from your browser to the recipient, in addition to using cloud hosting.
We use WebTorrent behind-the-scenes, so we need random access to the end-to-end encrypted version of the files to satisfy requests from peers. So we try to put the files on disk using Filesystem Access API or IndexedDB, falling back to in-memory if there's not enough storage.
Re:IndexedDB is completely broken in latest Safari
by azangru on Tuesday June 15, 2021 @07:52AM
(#27513946)
In-browser long-term storage.
Re:IndexedDB is completely broken in latest Safari
by tofukid on Tuesday June 15, 2021 @10:01AM
(#27515648)
Yeah, but of what? Caching the downloaded file? I wouldn’t think encrypted file links would need long term storage of anything. You receive the link, key exchange is derived from key in link, file is downloaded and decrypted on-the-fly.
Re:IndexedDB is completely broken in latest Safari
by azangru on Tuesday June 15, 2021 @10:24AM
(#27515957)
> Yeah, but of what?
As far as I understand Google's recommendation for web developers, of anything [0]. Their position is, avoid localStorage because it's synchronous, use indexedDB because it's asynchronous. So anything you would use localStorage for, Google suggests putting into indexedDB instead.
I don't remember whether the browser API was expected to get AsyncLocalStorage like the Node API has, or whether that would change Google's recommendations for developers.
Re:IndexedDB is completely broken in latest Safari
by whoisburbansky on Tuesday June 15, 2021 @11:12AM
(#27516648)
GP’s point is that at first blush it doesn’t seem like the Wormhole app should need any local storage in the first place.