5 ms·
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 da
by no_gravity 6y 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.
- judah 6y agoCertainly 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.
- no_gravity 6y agoCan 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.
- judah 6y ago"Good for users" was in the context of PWAs, not installed PWAs. Clearly the user's expectation is that clearing browsing data will clear data for web apps they navigate to in the browser. Installed PWAs is another question. I suspect users will be surprised if they clear their browsing data only to discover they have to login again to Twitter, for example. I may raise this question to the Edge Chromium team. I'm certain it's been raised before, but with Microsoft making PWAs first-class on Windows[0], this becomes a more prominent issue. [0]: https://www.windowscentral.com/heres-how-microsoft-making-edge-pwas-feel-more-native-apps https://www.windowscentral.com/heres-how-microsoft-making-ed...
- no_gravity 6y agoKeeping the user logged in is not the issue. A PWA can inject a unique ID into the installation in various ways. The problem is the data. Imagine a text editor where all your text documents are gone after you cleared the data of a different app, the browser. I wrote a fitness app as a PWA some time ago and its pretty annoying to download all the instruction videos again every time you clear your "browser data". Plus all infos about which exercises you did and when is gone for good of course.
- judah 6y ago> "Imagine a text editor where all your text documents are gone after you cleared the browser data" One way to address that issue is the native file system access APIs[0] coming soon, available today in Chrome Canary and Edge Canary. There, you'd be able to save your documents to the user's file system, just like a native app would. Those files will be exempt from any browser data clearing. > all infos about which exercises you did and when is gone for good of course. Might be good to store that data on the server. I realize not all PWAs have a proper backend server, but that sounds like a good candidate. [0]: https://bugs.chromium.org/p/chromium/issues/detail?id=853326 https://bugs.chromium.org/p/chromium/issues/detail?id=853326
- no_gravity 6y ago> Native File System API Great, so there is light at the end of the tunnel! > store that data on the server Well, we talked about that already: https://news.ycombinator.com/item?id=23793541 https://news.ycombinator.com/item?id=23793541
- iggldiggl 6y agoI wonder how Mozilla will handle this, given that so far they deemed file system access as too dangerous even for extensions, nevermind random web pages…
- 6y ago
- streptomycin 6y agoIt'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.
- notatoad 6y 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.
- ta17711771 6y agoSo make them app_db side user config data, not local browser database config data.
- kinlan 6y agoYou can request persistent storage that isn't cleared.
- judah 6y agoGood point! I had forgotten about this. kinlan is referring to this web API[0], which allows a PWA to store data persistently. [0]: https://web.dev/persistent-storage/ https://web.dev/persistent-storage/
- davrous 6y agoThey can thanks to the Native File System API coming with Project Fugu: https://web.dev/native-file-system/ https://web.dev/native-file-system/. Available via origin trial for now but it should be soon released more broadly.
- dmitriid 6y agoHave 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?
- pjmlp 6y agoI am typing this from Firefox, but the reality is that other vendors nowaydays mostly means Safari, everyone else is using Chrome engine and Firefox numbers diminish every year. The same crowd that now complains about Google, was worshipping Chrome, talking about how its its developer tools are, the multiprocess architecture, handling hundreds of open tabs (still to understand this one),..... So if the Web is turning into ChromeOS, they only have themselves to thank for.
- burtonator 6y agoPWAs 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.
- deleted 6y ago[deleted]
- bob1029 6y agoFor 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.