Hacker News new | past | comments | ask | show | jobs | submit login

I would love to build my next web project so it will not save any data on the server but let the user save it locally via the File System Access API.

That would give the user the same experience as with a desktop application. Full control over their data, saved locally.

The problem is that, according my tests, Firefox does not support it at all. Chrome does not support it on Android and Safari does not support it on iOS. Not sure about Safari on the desktop.

Here is a text editor demo which let's you try if it works with your browser:

https://googlechromelabs.github.io/text-editor/

If your browser supports it, it will let you load and save files just like a desktop application. If it does not support it, it will use a download/upload workaround.




There is a middle ground which all browsers do support, and not require permission prompts - Origin private file system https://developer.mozilla.org/en-US/docs/Web/API/File_System...

If you're not familiar it's a file-system like API for writing files to an opaque non-user-accessable file system. Your application could probably provide it's own export functionality using blob urls, and import using traditional file "upload".


The problem with these is that nobody has a single user agent anymore. Haven’t for years. If I need files I need them on my phone and tablet, or tablet and laptop. Those services have yet to become standardized.


> according my tests, Firefox does not support it at all

I just tried the text editor example in Firefox and it works fine for me, although all the newlines in my file were ignored so it looks like garbage. Maybe it assumes Windows-style line endings?

EDIT: Oh, no, it just doesn't support line endings at all? Even if I press the enter key I just get a space. Maybe it's just a proof of concept and not an actual working text editor.


I like that effort!

But it only addresses half of the value of self-hosting (which is much better than nothing). The other half is: being able to have control over the software itself, when/if it gets updated, being able to be sure what's done with the data (if you're sufficiently motivated), and not having the service become unavailable when the internet is out.


An alternative is to use Electron and ship your app with your own chromium.




Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: