PWA: persistent data storage

Just been reading through the articles about PWAs on samsunginternet.net

While it’s great to integrate PWAs into the app ecosystem, one thing that makes the whole thing completely useless is that to my knowledge it’s not possible to store any (persistent) data on the device in a PWA (by that I mean data that won’t be deleted when the user deletes browser cookies/caches).

Google make that clear for their WebAPKs: “Keep in mind that if the user clears their Chrome profile, or chooses to delete site data, that will apply to the WebAPK as well.”

I am assuming it’s the same for Samsung? Any thoughts about that?

Well it’s a matter of perspective. PWAs are most useful for services that have a cloud component - for example, a social networking application (Twitter is a great example of a PWA). In this case, all persistent data is stored in the cloud anyway. Also, the same could be said for any native application, where the user always has the option to clear local client-side data.

I would then rather say that PWAs are limited to services that have a cloud component. But even then the PWA can’t even keep user credentials for that cloud component (unless it’s all linked to a single account of the big players, otherwise users will complain about having to log in again for each PWA separately again).
BTW, can you clarify you comment about native applications? As far as I know a user can’t just clear local client-side data for local applications easily (other than removing/reinstalling the application).

Hi - yes a user, can clear local data for any application through Android settings. Also, a PWA is not limited to apps with a cloud component, as you can use local storage technologies to store data locally. Our demo application Bubble (bubble.pictures) is a good example of PWA that does not have a cloud component. (Source code here.)

Yes… a PWA can use local storage technologies, but that data will only be available as long as the user doesn’t clear the browser data/cache/… So as an app developer I just can’t count on that data remaining available for my app (and a user wouldn’t necessarily expect that clearing browser data will affect app data). Ideally, a user wouldn’t really care about if an app was a PWA or a native app, so why would deleting browser data affect some of the apps the user has “installed”, but not others.
Yes, sure I can come up with some limited demo apps that don’t use any storage.
Seriously, why can’t I have a (local) todo-list manager as a PWA? Do I have to put a big note in the app to tell users to never ever clear their browser data again when they want to use my app? Or do I just continue packaging it as a “native” app, so I can rely on the data remaining available? (ok, data can be cleared for native apps as well, but that needs to be specifically done for each app and comes with a big warning)

Here is an example to-do list PWA that uses local storage: https://github.com/poanchen/pwa-to-do-list

Sure, but how useful is that app when it forgets the TODOs at seemingly random intervals?