Handle lack of IDB
Giszmo opened this issue · 2 comments
Depending on one's settings, browsers might not allow the use of IDB. For example if Firefox is set to delete all data on close, websites are not allowed to write IDB in the first place.
I just noticed that https://polycentric.io/setup asks for permission to persist data. While I'm not sure what I just approved of (I can't see the site being added to the exceptions for data to be deleted on close), something like this is needed for Nostroid, too: Either a one-click solution or a clear warning: "This browser doesn't allow us do our thing. Please read this blog post on why that might be happening."
I think it would make sense to check for service worker and IDB availability in root +layout.svelte
before registering service worker.
This plus some meaningful message that helps the user use the product. At the very least point to the GitHub issues to get help.