News for hackers. Stuff that matters.
Re:New WebKit features in Safari 15.4 by jimkleiber on Monday March 14, 2022 @05:11PM (#30678388)
Edit: removing the snark/sarcasm I put into it.

I was really hoping this announcement would include support for push notifications for PWAs. I've been trying to build a few Discourse forums and they work very well as PWAs except for the fact that iOS doesn't support PWAs sending push notifications.

So here's to hoping the next iteration will.

Re:New WebKit features in Safari 15.4 by Someone1234 on Monday March 14, 2022 @05:42PM (#30678767)
I want it so I can uninstall Facebook Messager.

On Android I can log into Facebook's website, and receive push notifications via the web-browser. On iOS my choices are either the native iOS app (which has substantially more data hooks) or nothing at all.

Essentially browser Push Notifications increase my privacy.

PS - I am sympathetic to complaints about push notification request spam, but that feels like a solvable issue without throwing the dishes out with the bathwater. You shouldn't need an "app" just for notifications.

Re:New WebKit features in Safari 15.4 by heavyset_go on Monday March 14, 2022 @07:34PM (#30679944)
Apple likes to trot out Facebook as a privacy boogeyman when it comes to defending their App Store business model, but when their business model necessitates that Facebook has invasive native apps, suddenly they're silent.

PWAs would increase security all around compared to native apps, but that might cut into App Store revenue.

Re:New WebKit features in Safari 15.4 by CharlesW on Monday March 14, 2022 @08:13PM (#30680196)
> Apple likes to trot out Facebook as a privacy boogeyman when it comes to defending their App Store business model, but when their business model necessitates that Facebook has invasive native apps, suddenly they're silent.

Are you joking? https://www.macrumors.com/2022/02/03/facebook-10-billion-in-...

Re:New WebKit features in Safari 15.4 by heavyset_go on Monday March 14, 2022 @09:06PM (#30680620)
Exactly my point, they'll trot Facebook out as a defense of their App Store model just like they did here. PWAs from the beginning would have prevented Facebook from collecting data for the last decade in the first place, but that's not a solution Apple would allow.
Re:New WebKit features in Safari 15.4 by comex on Monday March 14, 2022 @09:37PM (#30680814)
True, a PWA wouldn’t have been able to get the unique device ID, which is (I think) the only technical effect of the App Tracking Transparency toggle added last year. But that toggle also has legal effects that go further [1]. For instance, apps can’t “[display] targeted advertisements in your app based on user data collected from apps and websites owned by other companies”, even that data was correlated with your app session based on, say, account name or email address rather than device IDs. But the only reason Apple is in a position to impose this kind of requirement is that they’re a gatekeeper for iOS apps. With web apps, short of government action, the best you can do ask nicely, and we all know how the Do Not Track header ended up.

[1] https://developer.apple.com/app-store/user-privacy-and-data-..., “Asking Permission to Track”

Re:New WebKit features in Safari 15.4 by blacklivsmatr on Monday March 14, 2022 @09:59PM (#30680946)
With a web-app, you can write an extension. With native, no such luck.

https://www.fbpurity.com/

Re:New WebKit features in Safari 15.4 by CharlesW on Monday March 14, 2022 @10:06PM (#30680972)
> Exactly my point, they'll trot Facebook out as a defense of their App Store model just like they did here

I don't understand why that's unexpected when a core idea of the App Store model is that Apple can better protect its customers against bad actors.

> PWAs from the beginning would have prevented Facebook from collecting data for the last decade in the first place…

I'm not sure how you arrived at that conclusion. My assumption is that a rounding error's percentage of Facebook users choose the PWA over the native app on platforms which support both, like Android. If you have actual data on this, I'd appreciate hearing about it.

Re:New WebKit features in Safari 15.4 by zamadatix on Tuesday March 15, 2022 @12:02AM (#30681538)
The claim is expected it's just being called out as false basis with explanation of why after your quoted section.

I don't really see how % of users plays into it. I mean it's great the App Store is finally on board with being more strict on blocking user tracking after a decade of business but as long as more than 0 wanted to fix it before and couldn't because of the PWA and/or app sources policies then then policy around not-allowing those is based on protecting the App Store regardless how often privacy is brought up as the reason.

I mean it's great they protect it for the customers that fall towards the default option now don't get me wrong but while nice that doesn't really have anything to do with why all users were forced through the App Store before or after the policy change.

Re:New WebKit features in Safari 15.4 by eyelidlessness on Tuesday March 15, 2022 @03:01AM (#30682416)
Can I just say “throwing the dishes out with the bathwater” is the best thing I’ve read today? I want you to get the notifications you prefer, I want to not get web notifications, I don’t care to argue over that. I just want to appreciate doing the dishes in anyone’s bath water. That’s darn efficient!
Re:New WebKit features in Safari 15.4 by js2 on Monday March 14, 2022 @06:03PM (#30679032)
I interact with FB messages solely through mbasic.facebook.com, even on my phone. It’s painful enough to keep me off the site, a benefit.
Re:New WebKit features in Safari 15.4 by toastal on Monday March 14, 2022 @09:12PM (#30680667)
I've used it in a container for ages (SlimSocial on F-Droid store). I removed it being listed by my launcher so I have to go through Settings > Apps and scroll that list. It's so annoying to use and get to it that I barely use Facebook anymore.
Re:New WebKit features in Safari 15.4 by jimkleiber on Monday March 14, 2022 @06:20PM (#30679217)
Whoa I didn't know that this existed, thank you for sharing it.
Re:New WebKit features in Safari 15.4 by muhehe on Monday March 14, 2022 @07:12PM (#30679763)
How do you use messenger like this? When I go to messenger.com a get pretty much just button with link play store...
Re:New WebKit features in Safari 15.4 by Someone1234 on Monday March 14, 2022 @08:25PM (#30680278)
Just log into Facebook.com in Chrome, enable Push Notifications, and then press new message notifications to re-launch Facebook.com.
Re:New WebKit features in Safari 15.4 by toastal on Tuesday March 15, 2022 @03:36AM (#30682613)
Not recommended unless you have some isolation as you maybe leaking data through the browser.
Re:New WebKit features in Safari 15.4 by BHSPitMonkey on Tuesday March 15, 2022 @04:21AM (#30682835)
Turn on Desktop Mode for that site.
Re:New WebKit features in Safari 15.4 by xfalcox on Monday March 14, 2022 @08:09PM (#30680171)
As the person working on PWA stuff on Discourse I can assure we will be adding push support in iOS as soon as it's ready. It's a shame this is taking so long on iOS devices...
Re:New WebKit features in Safari 15.4 by jimkleiber on Monday March 14, 2022 @09:12PM (#30680673)
Oh, hey! Yes, from what I've seen on Discourse, you all are probably more excited for this than I am. Thank you for doing this.
Re:New WebKit features in Safari 15.4 by hwers on Monday March 14, 2022 @06:14PM (#30679143)
Personally I really hope they don't add this. Imagine how annoying to have to decline a "please turn on notifications" on every news site on your phone (which you're spammed with on desktop).
Re:New WebKit features in Safari 15.4 by jimkleiber on Monday March 14, 2022 @06:19PM (#30679202)
That would annoy me, too. Maybe they could have it only work for when you Add to Homescreen as a progressive web app, then it would be more opt-in.
Re:New WebKit features in Safari 15.4 by filoleg on Monday March 14, 2022 @06:26PM (#30679281)
This is actually the perfect compromise that I haven’t even thought of until you’ve mentioned it. Up until now, I was opposed to webkit push notifications for the same reason as the grandparent comment. Thank you for your comment.
Re:New WebKit features in Safari 15.4 by joshstrange on Monday March 14, 2022 @08:19PM (#30680223)
Unfortunately Apple has crippled PWAs compared to the exact same code running in the browser on multiple occasions. Up until just about a year and a half or so ago you couldn't access a WebRTC stream from a PWA. The main use-case I needed this for was for a barcode scanner (which uses WebRTC under the hood) so my options were "deal with browser chrome" or "repackage into an app", I ended up doing the second (and to be fair that was my ultimate goal) but I would have preferred to skip dealing with that until later (prototyping is still faster on web for me, even with live dev builds on mobile).
Re:New WebKit features in Safari 15.4 by dwaite on Tuesday March 15, 2022 @04:45AM (#30683002)
AFAIK historically Home Screen web apps were run in a separate runner from the main Safari based on the web view control, and thus limited. There was a time they didn't get native JIT for javascript, either.

My suspicion is that they internally treat it as their own third party browser - e.g. they don't want to give it more entitlements/capabilities than a Firefox or Chrome browser would have from the iOS app store.

My suspicion also is that they have had a bit more wood behind the arrow to get media APIs working lately due to pushing large third-party cloud game subscription services to use the browser, and the regulatory scrutiny that likely brought on.

Re:New WebKit features in Safari 15.4 by jimkleiber on Monday March 14, 2022 @06:58PM (#30679622)
You're welcome! Yeah, I didn't even know that they could segregate it based on whether it was going through the Add to Homescreen option, but learned of it through the article:

> Web App Manifest improvements include ensuring the browser always fetches the manifest file during page load instead of when the user chooses to “Add to Home Screen” from the Share menu.

Re:New WebKit features in Safari 15.4 by spaethnl on Monday March 14, 2022 @08:39PM (#30680394)
Apple could implement this with a default of "automatically decline all", allowing users to only manually opt-in when they feel the need without ever seeing a prompt.

If you mean html/css prompts rather than actual browser prompts: they already do that.

Re:New WebKit features in Safari 15.4 by ec109685 on Monday March 14, 2022 @08:20PM (#30680240)
It’s available on desktop and not that annoying.

They could use their differential privacy to only allow for sites that have a reasonable opt in rate, and global opt out.

Re:New WebKit features in Safari 15.4 by the_other on Monday March 14, 2022 @08:29PM (#30680309)
> It’s available on desktop and not that annoying.

It’s pretty annoying.

- the dialog is model

- it’s small, and drops down from the top (a “reverse toast”?)

- I frequently use screen zoom So am typically unable to see the top of any window because I’m reading content

- I click a link, the page loads, the “toast” drops down but I don’t see it, suddenly nothing on the page works

For 99% of sites which ask for permission the answer is “no”. So that’s a lot of annoying web sites.

Re:New WebKit features in Safari 15.4 by ryanbrunner on Monday March 14, 2022 @09:08PM (#30680639)
A lot of these complaints are about the underlying notification system, which is way, way better on iOS than on Mac, and is already what you get if you have app notifications anyway.
Re:New WebKit features in Safari 15.4 by jmull on Tuesday March 15, 2022 @04:38AM (#30682948)
I’m surprised by all the heat around the push notifications API.

Is it really going to mean that much to web apps? I’m assuming it will work pretty much like push notifications on desktop, which is an awful UX.

Re:New WebKit features in Safari 15.4 by stack_framer on Tuesday March 15, 2022 @10:12AM (#30685532)
It would mean a great deal to all sorts of web apps!

To provide just one example, I released a turn-based word game as a PWA two years ago. With no option for native push notifications on iOS, I decided to email players to notify them each time it was their turn in a game.

Despite my domain having full support for DKIM, SPF, and DMARC, the usual problems of email were still a huge pain: Some domains (I'm looking at you hotmail.com) considered everything spam. In some email clients, the design of the emails looked totally wrong. Some of the more active players complained (rightfully so) that their inbox was filling up with these emails.

Sadly, the overwhelming majority of games never got past one or two moves, in part because one of the two players didn't see the email that it was their turn.

So yes, it would really, really help small businesses like mine if Safari would catch up here!

Re:New WebKit features in Safari 15.4 by dbbk on Wednesday March 16, 2022 @06:19AM (#30697082)
The point is it would be overwhelmingly used for spam, causing users to tune out of all notifications.
Re:New WebKit features in Safari 15.4 by doctor_eval on Monday March 14, 2022 @05:52PM (#30678902)
I thought I read [0] that there will be experimental support for push notifications in 15.4. Perhaps keep any eye on advanced safari settings when it comes out?. At least there appears to be progress, and you may be able test it.

[0] eg, https://www.macworld.com/article/610673/ios-15-4-safari-push...

Re:New WebKit features in Safari 15.4 by alwillis on Monday March 14, 2022 @05:56PM (#30678954)
It’s in there but but not enabled by default, meaning it’s still in beta.

It’ll probably be officially announced at Apple’s World Wide Developers Conference in June.

Re:New WebKit features in Safari 15.4 by fouc on Monday March 14, 2022 @07:07PM (#30679711)
If we can enable it for our own purposes then that's big. Doesn't need to be on by default.
Re:New WebKit features in Safari 15.4 by alwillis on Monday March 14, 2022 @07:31PM (#30679928)
If we can enable it for our own purposes then that's big. Doesn't need to be on by default.

Agreed.

Not being on by default likely means it's also buggy and incomplete.

Re:New WebKit features in Safari 15.4 by eyelidlessness on Tuesday March 15, 2022 @02:57AM (#30682391)
I’m sure many of your users would welcome this feature but I’m personally grateful that I don’t get random notifications from websites.
Re:New WebKit features in Safari 15.4 by vetinari on Tuesday March 15, 2022 @03:34AM (#30682600)
You would not; you must grant a permission to push notifications to the site first.
Re:New WebKit features in Safari 15.4 by dwaite on Tuesday March 15, 2022 @04:36AM (#30682930)
I'm grateful I don't get random popovers asking me whether or not I would approve a popup asking me to grant permissions for push notifications (because the scripts exit early on mobile safari)
Re:New WebKit features in Safari 15.4 by vetinari on Tuesday March 15, 2022 @06:42AM (#30683751)
I don't feel overwhelmed by popups asking me to grant permissions for push notifications. But I'm glad that both sites where I care for them, can push them.
Re:New WebKit features in Safari 15.4 by eyelidlessness on Tuesday March 15, 2022 @09:06PM (#30694048)
I mean, yeah, with a thing popping up on my screen to ask me for it. Which is fine if I, say, install it as an app (eg PWA or whatever), but super annoying on websites I’m visiting for the first time.
Re:New WebKit features in Safari 15.4 by Kbelicius on Tuesday March 15, 2022 @03:20AM (#30682513)
If other users were able to get notifications from websites that doesn't mean that you would get them, especially not from random websites.
Re:New WebKit features in Safari 15.4 by kitsunesoba on Monday March 14, 2022 @09:09PM (#30680650)
Doesn’t supporting web push notifications involve having worker processes running in the background all the time to poll or keep a socket open for updates? I could see that dragging down battery life if one has notifications for more than just a small handful of PWAs enabled.
Re:New WebKit features in Safari 15.4 by rabuse on Tuesday March 15, 2022 @01:27AM (#30681938)
Native apps already do this...
Re:New WebKit features in Safari 15.4 by Nextgrid on Tuesday March 15, 2022 @05:20AM (#30683210)
Disagreed; they don't. They delegate messaging to the Apple Push Notification service which is a single process that maintains a persistent connection (and receives messages on behalf of apps). Apps only get woken up when a notification actually arrives.
Re:New WebKit features in Safari 15.4 by tekacs on Monday March 14, 2022 @05:50PM (#30678876)
I was following this and it did seem to appear in the beta -- I'm not sure whether it has been removed in the GA version listed here, or if they simply haven't mentioned it since it's perhaps a browser rather than WebKit feature?

... I assume WebKit has had support for this for a long time, since Safari on macOS has long supported push notifications.

https://firt.dev/ios-15.4b

Re:New WebKit features in Safari 15.4 by heavyset_go on Monday March 14, 2022 @07:38PM (#30679969)
> since Safari on macOS has long supported push notifications.

Safari on macOS does not support the web Push API[1]. Apple has a proprietary Safari Push Notification service that requires all notifications to go through Apple's servers first[2].

[1] https://caniuse.com/push-api

[2] https://developer.apple.com/notifications/safari-push-notifi...

Re:New WebKit features in Safari 15.4 by tekacs on Tuesday March 15, 2022 @01:04PM (#30687838)
Ah, thank you. :)
Re:New WebKit features in Safari 15.4 by moltke on Tuesday March 15, 2022 @03:45PM (#30690450)
>So here's to hoping the next iteration will.

I've completely given up any kind of hope for iOS.

I hoped for years iOS would do reasonable things like allowing side loading or multitasking or push notifications. Apple knows these things would improve the platform, they don't do them because it would cut into their profits. If these features are ever added to the platform they will be handicapped in some way that makes them almost useless.

Re:New WebKit features in Safari 15.4 by electric_muse on Monday March 14, 2022 @10:32PM (#30681100)
While we don't see updates in this announcement, we may start seeing more because they're getting so much antitrust pressure [0]. Handicapping PWA support by not supporting push notifications works strongly against any arguments they would want to make about there being viable alternatives to listing in the app store.

[0] https://www.forbes.com/sites/siladityaray/2021/08/27/apple-a...