top | item 23793368

(no title)

no_gravity | 5 years ago

The main problem I see in PWAs these days is that they cannot permanently store data on the device. As soon as the user deletes their "browser data", all the data of the PWAs on the device is lost too.

If PWAs would get their own permanent storage like other apps, it would be a huge step forward.

discuss

order

burtonator|5 years ago

PWAs are designed with the web/cloud in mind. The permanent data should be hosted in the cloud.

One of the issues is that storage in a PWA is done via localStorage or IndexedDB... both of which aren't really available outside of the browser.

Also, part of the benefit of a PWA is being able to be in mobile devices and 'storage' there is different than on the desktop.

judah|5 years ago

Certainly it's true PWAs are subject to the user's desires about browser data. I think that's a good thing for users.

PWAs usually store client-side data as a kind of cache: cookies, local storage, service worker cache. Caches are not meant to be permanent.

There may be room for improvement here, however. One might imagine that clearing browser data shouldn't clear data for installed PWAs. That's an argument worth further evaluation.

streptomycin|5 years ago

It's only marginally subject to the user's desires. I wrote a fairly popular PWA and the most common questions users have are...

"Why did all my data get deleted? How can I get it back?"

and

"Why is it saying the browser won't let me store more data?"

The user's desires are pretty clear in both cases, but it's very unclear how the user can get what they want.

no_gravity|5 years ago

Can you elaborate why it could be a good thing for users?

Not being able to reliably store data on the device means that PWAs have to send the users data over the internet and store it on an external server. I would think users rather do not like that.

I am only talking about installed PWAs here. Of course not every website should be able to avoid having its cookies deleted.

notatoad|5 years ago

>Certainly it's true PWAs are subject to the user's desires about browser data. I think that's a good thing for users.

i mostly agree, but the user experience isn't there yet. browsers make it easy to delete all data, but don't have any workflows that encourage deleting the data from only a single app. at this point, it seems less about empowering users to have control over their own data and more like browsers just don't care about PWA data.

davrous|5 years ago

They can thanks to the Native File System API coming with Project Fugu: https://web.dev/native-file-system/. Available via origin trial for now but it should be soon released more broadly.

dmitriid|5 years ago

Have any other browser vendors expressed any interest in this?

I see from the link that Chrome is already doing an "origin trial" even if the spec itself isn't complete. So, why would it be "released more broadly". Or is it the Constructible Stylesheets again? When both Safari and Mozilla said "no", but Chrome released them anyway?

kinlan|5 years ago

You can request persistent storage that isn't cleared.

ta17711771|5 years ago

So make them app_db side user config data, not local browser database config data.

bob1029|5 years ago

For the PWAs I'd like to deploy, all I really need is 256 bits of entropy to persist on each client. I am entirely done with the ideology where I offload arbitrary storage and compute concerns to client devices. Keeping it all on the server is so much better in almost every way.