Live data from Hacker News

Private client-side-only PWAs are hard, but now Apple made them impossible

andregarzia.com

371–380 of 927 posts

Re: Private client-side-only PWAs are hard, but now Apple made them impossible

#371
post #369

Earlier quoted context omitted.

Sorry, I wrote this blog post too fast because I was/am a bit angry and didn't notice my usage of jargon without explanation. It is a “Progressive Web App”. Sorry for the jargon usage without explanation. Basically it is a marketing term used to place some new web APIs and best practices into an umbrella of a “near native UX on a Web App”. What it usually means is that your application is: * Served from a secure cont…

Thanks for your reply :) I recognize often articles are meant for a specialized audience and shared here without the author even being aware of the site, so it's unreasonable to expect that everything be described to a total neophyte, but sometimes I have to laugh at the buzzword articles that get posted here about how to implement foo in bar on baz, using a fizzbuzz framework running blarg, and I have no idea what A…

I going to make sure in the future that I don't fall into this behavior again. :-)

Re: Private client-side-only PWAs are hard, but now Apple made them impossible

#372
post #360

It doesn't scale from device to device for settings or items that should stay for longer than a week. Local storage should be treated as cache.. it may get refreshed. What Apple did was fine. A backend isn't only for storage either.

It is not fine if you're creating apps that don't have a backend.

Honest question - If you're creating an app like that, is a PWA really the right way to go? Aren't there other options available (such as creating a native app with a SQLite database)?

Re: Private client-side-only PWAs are hard, but now Apple made them impossible

#373
I think this is a good idea. Developers should not be able to store something on my computer indefinitely without my consent. This doesn't apply to applications users add to their home screen.

This doesn't "destroy" the PWA ecosystem. Just makes a user's intention explicit when they save a PWA to their home screen, rather than continuing to use it within the browser.

From the WebKit Blog (https://webkit.org/blog/10218/full-third-party-cookie-blocki...) "Web applications added to the home screen are not part of Safari and thus have their own counter of days of use."

Re: Private client-side-only PWAs are hard, but now Apple made them impossible

#374
What’s wrong with a “normal” app? No server required and data stays only on the device. The argument that the author is building a PWA because other people abuse privacy (with apps) doesn’t make much sense. Why not build the app, respect privacy, and be done with it?

LocalStorage is not a substitute for an actual database, it’s a cache. The problem with the author’s technique is that privacy minded users clear their browsers from time to time, so they would be inadvertently clearing data they actually wanted to keep because who uses LocalStorage as a persistent data store? Sure it could be used like that as an “off label” use, but generally it’s used to cache what is persistently stored elsewhere or used as a means to avoid multiple network calls in the process of doing something (such as saving calculations, the results of which would be eventually persisted.) Local Storage should be used as if it were a session store rather than something persistent.

Re: Private client-side-only PWAs are hard, but now Apple made them impossible

#375

Sounds like the solution is to add the app to your home screen. I don't think its reasonable for a browser to let any site I ever interact with to store data on my device indefinitely

Even web apps that you add to your home screen are subjected to this.

"Web applications added to the home screen are not part of Safari and thus have their own counter of days of use."[1]

From WebKit: [1] https://webkit.org/blog/10218/full-third-party-cookie-blocki...

A Note On Web Applications Added to the Home Screen

As mentioned, the seven-day cap on script-writable storage is gated on after seven days of Safari use without user interaction on the site.” That is the case in Safari. Web applications added to the home screen are not part of Safari and thus have their own counter of days of use. Their days of use will match actual use of the web application which resets the timer. We do not expect the first-party in such a web application to have its website data deleted.

If your web application does experience website data deletion, please let us know since we would consider it a serious bug. It is not the intention of Intelligent Tracking Prevention to delete website data for first parties in web applications.

Re: Private client-side-only PWAs are hard, but now Apple made them impossible

#377
Maybe I'm being cynical here -- I'm not a web developer but have lots of experiencing managing web-based products -- but if you want to have state you should store it in the cloud, because local devices are volatile. Xbox Live, for example, uses a fairly simple service for cloud saves for games; local saves still happen but any developer has the option to push saves to the cloud. The author definitely raises good points about how it's easier for developers to not have to worry about it, but cloud saves have some hefty benefits, like multi device support, user getting a new device, etc.

Re: Private client-side-only PWAs are hard, but now Apple made them impossible

#378
post #360

It doesn't scale from device to device for settings or items that should stay for longer than a week. Local storage should be treated as cache.. it may get refreshed. What Apple did was fine. A backend isn't only for storage either.

A lot of "normal" apps treat local storage this way. A lot of those apps are basically a wrapper around a WebView. Why does apple accept it there but not for PWA:s?

Re: Private client-side-only PWAs are hard, but now Apple made them impossible

#380

Is there any evidence that local storage is being used as a pseudo-cookie way of tracking users? If so, keeping local storage saved while regular cookies are being deleted would defeat the purpose of deleting cookies for anti-tracking reasons.

> Is there any evidence that local storage is being used as a pseudo-cookie way of tracking users?

Yes [1].

[1] https://clearcode.cc/blog/alternatives-to-cookie-tracking/

Post reply on HN