Skip to content

webdav alternatives

linusha edited this page Mar 24, 2023 · 1 revision

We recently discovered that one thing that makes tab-switching really slow is that we always enumerate the file hierarchy when navigating folders/packages inside of the browser, which also happens when we switch between tabs.

File System API

This lead to me investigating alternatives to using webdav for file system access, specifically the File System Access API.

I got it to work in the end and it is probably not super hard to write a lively.resource plugin that wraps this API for convenient access to the users file system inside of lively. However, the browser forces the user to confirm the token permissions once upon each browser start. This is still necessary, when one stores a confirmed token inside of the indexeddb. We decided against pursuing this further, as this is a) not great from a UX perspective and b) will very probable not change, as it is a core part of browser security.

We learned the following two important things:

  1. It is not necessary to server localhost over https to use the above mentioned API.
  2. On Linux when using the browser via flatpak, file creation will fail with a not super helpful error message. This is due to the sandboxing nature of flatpaks and can be resolved by granting the correct permissions on startup of the flatpak (--filesystem=host).

PWA

Being an installable PWA will also not save one from the above mentioned prompt.