News for hackers. Stuff that matters.
Re:A future for SQL on the web by derefr on Thursday August 12, 2021 @01:00PM (#28158742)
I would point out that the article you linked mentions that webapps "added to the home screen" on iOS Mobile Safari are exempt from this garbage-collection process. In such a case, the "add to the home screen" step is being taken as the user expressing the explicit desire to have that data around indefinitely. Which seems sensible to me; webapps should be treated as ephemeral-by-default, and only be allowed persistent storage if the user goes to lengths (i.e. beyond just clicking "Accept" on a modal) to express their desire to keep the data.

(And also, I've observed that webapps that notice they're on an iOS device can insist on being "added to the home screen" before they'll do anything, and so ensure their data stays around.)

The problematic aspect of this, is that there's no equivalent of this "exemption by user explicitly expressing the desire to keep the app around" for non-mobile Safari.

Maybe for desktop Safari, the data should be kept around if the web app's rel="canonical" URL is bookmarked in the browser?

Or desktop Safari could just support regular Progressive Web App standards, and so show an "Install App" indicator (like e.g. desktop Chrome does for this webapp: https://www.soundslice.com/). But I have a feeling Apple will never support this on desktop...

Re:A future for SQL on the web by tarsinge on Thursday August 12, 2021 @02:18PM (#28159626)
PWA are not a standard, they are a Google concept pushed through Chrome (OS). I’m fine with Apple never supporting it.
Re:A future for SQL on the web by monocasa on Thursday August 12, 2021 @03:34PM (#28160484)
PWA is a Google term, but the whole web app thing is older than even the native app store on iPhone.
Re:A future for SQL on the web by BadInformatics on Thursday August 12, 2021 @04:36PM (#28161107)
Google may have coined the term (not sure about this), but it's far from their own thing [1]. PWA should've been a blanket term for a set of standards and guidelines for developing web apps. Those include progressive enhancement, which I don't think most people would expect.

Unfortunately, the term has been co-opted to mean "website I can install/pin as an app". Again, Google is probably to blame for this, but AFAICT it was never meant to be the meaning of the term. What it does do is create misunderstandings, like a sibling thread claiming that (desktop) Firefox doesn't support PWAs because you can't install anything.

[1] https://developer.mozilla.org/en-US/docs/Web/Progressive_web...

Re:A future for SQL on the web by derefr on Thursday August 12, 2021 @08:01PM (#28163443)
In general, the "Progressive" in "Progressive Web App" just means "progressively-enhanced." In conventional usage around most of the internet, any web app that supports any kind of progressive enhancement, is a PWA.

And "progressive enhancement" just means "being written in such a way that you'll work with a core set of APIs — all the way down to 'no javascript support' — but will take advantage of further APIs if they're available." Where the app forms a sort of Russian nesting doll of functionality, where it "launches" with just the innermost layer (e.g. just server-rendered HTML), and then in turn each new layer is enabled if possible (i.e. if Javascript is enabled, the browser will load some JS from a <script> tag that will then take over the DOM and turns the page into a SPA; etc.)

It's just a further refinement of the older concept of "graceful degradation", where the gracefully-degraded experience is delivered at the start, and then bootstrapped out into the non-degraded version.

Under this definition, the "further layers of functionality" provided to "installed" webapps in some browsers are just a specific kind of progressive enhancement. The app detects that it's being run "installed", and takes advantage of that. (And before that, the browser detects that the app has such a layer, and therefore treats the webapp as "installable.")

Thus, all "installable" apps are PWAs. (But not all PWAs are "installable"!)

I would note that webapps like Slack — i.e. webapps that have both web and "native" versions, where the "native" version is just the same remote webapp from the web version, loaded in a special browser that exposes extra capabilities that the webapp then takes advantage of — are also PWAs by this definition.

Re:A future for SQL on the web by mst on Thursday August 12, 2021 @02:33PM (#28159793)
So long as I can also use them in firefox they're 'unstandardised but not single vendor' and at that point I'm not as troubled about it.
Re:A future for SQL on the web by TingPing on Thursday August 12, 2021 @03:47PM (#28160612)
Firefox doesn't support PWAs...
Re:A future for SQL on the web by mst on Thursday August 12, 2021 @05:05PM (#28161457)
They don't support the same precise system, but you can e.g. definitely do installable apps on Firefox for Android: https://developer.mozilla.org/en-US/docs/Web/Progressive_web...
Re:A future for SQL on the web by Touche on Thursday August 12, 2021 @03:47PM (#28160608)
Which specific feature of PWAs is non-standard?
Re:A future for SQL on the web by arthurcolle on Thursday August 12, 2021 @02:21PM (#28159661)
I wish these bookmarks extended to other browsers on iOS. It's already crazy they can't ship custom rendering engines, but basically this in and of itself could be considered anticompetitive (only Safari bookmarks can be exempted from this GC process) lol!
Re:A future for SQL on the web by ricardobeat on Thursday August 12, 2021 @02:47PM (#28159968)
I think all home screen apps run on the system webview, there are no “safari bookmarks” in this context.
Re:A future for SQL on the web by arthurcolle on Saturday August 14, 2021 @09:50PM (#28185567)
you can only add bookmarks from the home screen from Safari. Chrome, Firefox, etc do not have this capability