Closed slaymaker1907 closed 3 years ago
As a user, why should I want, that a file handle from my harddisk is stored on a server? Encrypted or not. If I store content locally, everything needs to be locally. No info goes to the server. nothing - never!
https://github.com/slaymaker1907/TW5-browser-nativesaver is why. It is specifically extremely useful for self modifying HTML on the local file system.
If you actually read my proposal, you would note that there are no additional privacy/security implications since any data exposed by these handles must either be invisible externally or already easily available to the site in question. I would expect these handles to get invalidated by browsers at the same time as IndexedDB and/or localStorage.
The only thing this should enable is avoiding the horrific IndexedDB APIs (look at my reference code and note how much is devoted to IDB nonsense) and giving slightly more flexibility.
I'm not really sure this makes sense... the server has no use to store that string... and could cause issues if the handle is saved and associated with a user account. If they use another device to access the server the handle would be useless on the new device.
in any case, if the wiki files are saved in a folder that you request access to, all these file references can be re-created by traversing that folder when they open your app the next time.
I'm not sure I understand the benefits this has over the current system where you can store handles in IndexedDB? We'd probably have to invalidate all such created serializations at the same moments in time where currently IndexedDB is cleared, so websites could just as well maintain a mapping of random string to handles in IndexedDB themselves. I don't think there is much benefit in the browser providing this mapping.
Why?
My specific use case is for self modifying HTML (single file TiddlyWiki). It would be nice to save these handles to the wiki itself (i.e. save the handle to a file to the file itself). IndexedDB introduces security problems when using file:// in addition to being much more inconvenient.
I think being able to store these in cookies/on the server also makes things easier to integrate into existing software.
Requirements
Implementation Ideas
Security