Hacker News new | ask | show | jobs
by samuelstros 613 days ago
Webapps will work locally soon. Say hello to OPFS https://web.dev/articles/origin-private-file-system. Works surprisingly good, see this demo app https://fink2.onrender.com/
2 comments

"Can store data" isn't "will work locally"

For one thing, it's origin-private, so take a guess how well that works when the company owning the DNS records for that origin goes out of business.

(There's also the issue with actually having an executable that can just run without any external dependencies)

Yeah bummer that Safari and Firefox are blocking any origin file access for security reasons.

> when the company owning the DNS records for that origin goes out of business.

Likely not a problem. Local data in OPFS is synced with a remote server for collaboration reasons anyway.

> There's also the issue with actually having an executable that can just run without any external dependencies

Assume you target the browser as OS, then it's already possible to have an executable: Run the JS file that renders a UI. Related: We will likely have an app launcher demo soon for https://lix.opral.com/

Sadly, I don’t think Safari or Firefox are close to shipping OPFS. https://caniuse.com/?search=File%20System
OPFS works in Safari, see this demo app https://csv-n2qj.onrender.com/.

What doesn't work in Safari and Firefox is (non sandboxed) access to the files of a user. OPFS is sandboxed.

Oh, thanks! That actually makes it useful for something I want to do.
I wish we could talk about your use case later at Local Thirst. But ... I lost my passport and won't be able to make it. Another time!