Get the top HN stories in your inbox every day.
LeanderK
yamtaddle
Ugh, no. It's bad enough they can pop "THIS SITE IS BETTER IN THE APP" shit. The last thing we need are more ways for a site to shove things in front of me to make my day worse.
Keep it user-driven.
saurik
OK, then the mechanism that let's websites prompts to install apps should be removed so apps are on the same level as web apps. Otherwise, the situation is part of the anti-competitive lock-in. If that won't be removed--and we know it won't be--then this feature needs to be added and will not make the situation worse: it will just mean that there is a hope that some of these websites prompt you to install a website instead of an app. If you want to stop getting prompted to install anything at all, then you need to either remove support for push notifications from apps--which obviously will never happen--or add support for push notifications to random "uninstalled" websites. (And if you don't like being prompted to activate push notifications for things, there should be a global switch to disable that feature... as they say: this isn't rocket science.)
yamtaddle
I'd love that, 90% of the ones I see are just from forum sites that use software that automatically provides some terrible "app" that no-one in their right mind would want, anyway.
IIRC (and I may be mis-remembering) they mostly just added that in the first place because sites were hacking in their own (which, on its own, might be fine), and other sites were abusing that dynamic for phishing or otherwise scummy purposes (not fine), since there was no standard look & behavior for those prompts. As long as installing PWAs requires user initiation with actions in the browser chrome, and can't be initiated by a link in site content, that shouldn't be a problem with PWAs.
Someone
> OK, then the mechanism that let's websites prompts to install apps should be removed so apps are on the same level as web apps.
AFAIK, such prompts are regular HTML with links to the AppStore. If so, how do you suggest Apple make it impossible to add those to a site?
lxgr
I mean, given that we already have "GO GET OUR APP NOW OR ELSE" prompts, would PWA prompts make things any worse?
And very often I'd actually prefer a PWA, e.g. if I know that I'll be using a given site/service exactly once. Common example: A flight or train ride with a carrier I know I won't be using again anytime soon, but still would like to get notifications relevant to my trip.
yamtaddle
Yes, there'd be way more of them, because the barrier to entry (and justifiable motivation for needing an "app" in the first place) would be even lower.
dbbk
It should probably be surfaced when you go to bookmark a site.
presentation
How about a system preference of “don’t show me these”?
encryptluks2
The install option on Chrome isn't in your face nor interrupting. It is a small icon and text on the URL bar.
Vinnl
The crucial element here is that this indeed needn't be
> more ways for a site to shove things in front of me
The prompt can be provided by the browser, at a moment of choice for that browser, in a standardised way, and with the option to be disabled globally. For example, a browser could choose to only show the option once for websites you use often and provide a manifest file, and/or when you bookmark them, and/or just show an icon in the address bar. So many ways to do this in a nonobtrusive way, that still makes sure that people who would be interested in adding it to the home screen (i.e. a subset of the people installing an app today) actually know they can do that.
SllX
One other thing is necessary too, but this is iOS specific: I need a way to dump these to my App Library off my Home Screen. I searched out a few PWAs to see what the current experience is like, and even if I wanted to keep any of these around, I don’t want them on my Home Screen per se.
jaywalk
You can put them on a hidden home screen. It's a pain, but it's the only way to keep the app but not have it on your home screen.
SllX
I had a response typed out, but I think I’m missing something. What is a hidden Home Screen on an iPhone? I have a one page Home Screen, after that it’s the App Library.
lxgr
I just have all PWAs (that I don't need shortcuts for) in a folder towards the end of my last home screen page.
I's long overdue to have them treated as first-class apps, though (i.e. allowing having them only in the app library and treating the home screen as an optional short cut only)!
cientifico
My experience is similar.
While Apple don't invest in PWA, PWA is doomed from a commercial point of view.
It is a really sad situation because the user experience of PWA is match better than installing apps from the store (with higher install rate than native).
Twitter is (or was) one of those examples. It took months until I realize that I was using a PWA than a native app.
threeseed
> Twitter is (or was) one of those examples. It took months until I realize that I was using a PWA than a native app.
Something is very wrong if you can't tell the difference. The difference is night and day on iOS.
PWA app has significantly lower responsiveness, constant mis-touches on buttons, loading screens for every click etc.
hn_throwaway_99
> PWA app has significantly lower responsiveness, constant mis-touches on buttons, loading screens for every click etc.
That's certainly not inherent to every PWA, e.g. there is no need to have a "loading screen for every click".
kitsunesoba
The twitter web app is such a mess. Only slightly better than "new" Reddit, which is probably one of the single worst offenders in the world of bad SPAs.
yamtaddle
> the user experience of PWA is match better than installing apps from the store (with higher install rate than native).
People have A/B tested "click this app store link to install" and "click this to install this webpage as a web-app" and found the latter gets more installs?
bobthepanda
That’s not really surprising. More clicks = more friction = more people not making it to the end.
dmitriid
> Twitter is (or was) one of those examples. It took months until I realize that I was using a PWA than a native app.
I can't believe people keep saying this with a straight face. It's as if they've never seen an proper native app before (any of the third-party clients to Twitter come to mind before they were axed). Or haven't seen actual good fast implementations like the one Twitter actually bought and surprisingly still kinda maintains (see on desktop, https://tweetdeck.twitter.com/)
kelthuzad
Why do you think PWAs are doomed? Is it because you suspect that Apple will continue to sabotage them regardless of likely fines by regulators?
tuxone
I wonder when you people will stop thinking with your marketing/growhacking/SEO/spam brain and start being on the user side. If you want low value visitors just go and buy ad clicks, thanks!
izelnakri
I strongly disagree that what he is asking is user hostile, just like asking microphone or camera permissions aren't user hostile. You also didn't need to lecture anyone like that on hacker news, thanks!
tuxone
What they are asking would be used as an annoying tool against the user in the same way today sites ask for user location or push notification (on other OSs).
Websites are not randomly asking for mic or camera because that would be creepy and visitors would just run away.
I am not lecturing, I am giving my feedback on the matter, like everyone else here. If your product is good, users will save your site in their home, don’t worry about that.
LeanderK
lol, this was a project I did for a friendly event free of charge. I choose PWA because it's only useful for three days and nobody is going to install an app for this, you want it working right away. I was getting good results but the experience was just way smoother on android. A good prompt/banner/whatever that the app is installable felt essential when viewing the users behaviour because it's "drive-by" usage.
hn_throwaway_99
What do you mean by the "install prompt"? (Sorry if this obvious, not an iOS user).
I thought it was fairly straightforward to add an "add to home screen" overlay to a webpage with javascript.
coder543
> I thought it was fairly straightforward to add an "add to home screen" overlay to a webpage with javascript.
On Android, yes. On iOS, users have to click “share” and “add to Home Screen”, which practically nobody knows how to do, and it presents the user with a rather confusing prompt for them to choose the name of the PWA they’re about to install. The website could tell you to do that, of course, but then it only works in safari at the moment, and it is very clunky.
iOS allows websites to show a banner that will help them install the equivalent app from the App Store, but there is no similar functionality for PWAs.
Some people speculate that Apple relies on the PWA install process being confusing to help push developers into the App Store.
donbrae
You can auto-populate the name field by specifying its value in the manifest.json file, eg https://github.com/donbrae/tripods-web/blob/e2fade06991a83ae...
hn_throwaway_99
> On iOS, users have to click “share” and “add to Home Screen”
Thanks very much for your detailed explanation. Man, more and more I don't know how people can continue to praise Apple for better usability. So much shit on an iPhone these days is in completely hidden, non-obvious gestures or swipes - e.g. why TF would anyone think "add to home screen" would be in the share menu?
xfalcox
It's been great. Web Share, Web Share Target, Notification Inline replies, Contacts API, are useful in the app I work on.
nevernude
Unfortunately a number of those APIs are still not available on iOS and have seen little to no traction[1]
latexr
> I view Apples reluctance to implement the install prompt as politically driven. They want to favour their AppStore and make installing Web Apps unnecessarily hard.
I keep seeing this touted as fact, yet no one has ever provided any evidence. I have the feeling everyone who says it is just mad at the feature not being there and they ascribe to Apple the most damming justification they can come up with.
Apple is greedy, especially under Tim Cook, but that doesn’t mean every decision is primarily motivated by it. Sometimes the people at Apple truly believe something is the right choice for the majority of users. Maybe you’ve been lucky to have never seen a relative’s device full of spammy web push notifications they don’t know how to turn off, but that is not rare. You can find reports of it among the other comments.
holoduke
Actually not bad. We are converting all our native apps to either webapps (still available in the store) and as a PWA. Performance was always an issue, but nowadays we are convenient that performance is good enough. Developping in web is soo much easier, cheaper and much much faster.
msoad
An important detail that you might miss without reading the article is that these capabilities are not available to any website a user visits. The user must add the website to the their Home Screen before the website can ask for notifications permissions.
As an iOS user I actually like this restriction. Can't imagine what the browsing experience would've looked like if any website could take their chance on sending me notifications
hbn
Good. Web push is such a mess. The amount of people with Android phones like my grandma that accepted push notifications on some spam site, either by accident or because users are so conditioned to just click "ok" to make popups go away, it's absurd.
solarkraft
The request mechanism is so broken. There shouldn't be a pop-up at all. The website should declare a notification source and you should be able to subscribe to it if you feel like it. Somewhere in the overflow menu. The website shouldn't even get the option to natively bother you about it.
dwighttk
I mean then they’d just have pop ups that told you how to turn on notifications and make it seem like you have to to continue… wouldn’t be as successful but it would still suck.
ocdtrekkie
That's the right way to do it, but then the Chromium team that implemented it doesn't get good numbers to use for their promo packets.
And there's no understanding among a lot of web standards people that popups for site permissions are widely used by malicious actors. Apple consulted the community and thought about security, and that's why this implementation is refreshingly better.
maicro
FYI, you can disable the ability for Chromium-based browsers to even ask the user if they want to allow notifications - on my Android phone in Chrome, it's under Settings, Site settings. There you can set "Notifications" to "Blocked" (and if you're paranoid like me, turn most others off as well).
babypuncher
You can do this in Firefox as well.
However, nagging the shit out of users should not be the default behavior. They knew that this feature would get abused by every sleazy webmaster on the planet as soon as it was supported in popular browsers. The feature should have been properly designed in the first place. Now I'm content with letting it die.
I appreciate Apple's willingness to more or less ignore open standards that hurt the user experience more than they benefit it.
starik36
I doubt his grandma would find this option.
zakki
I don’t know if they’ll accept this solution. The other camp just want: “It works automatically like magic”. I just want to point out that we have to be familiar with the tools we used.
brigandish
I wonder, does setting this stop one from getting or subscribing to notifications on sites where they're wanted?
postalrat
Are all the notifications from native apps fine? Or just the web notifications that are bad?
runarberg
Good question. I think the main difference is that it is so much easier to visit an annoying website then to download an annoying app. And your GP mentions how a good compromise is to grant this access only to websites you install to your home screen (which I think is a comparable action to downloading an app).
sneak
I regularly get spam notifications from major/famous iOS apps. It's always an instant uninstall for me.
IIRC this used to be against Apple App Store rules but I guess they got relaxed for spamming existing customers.
Fastest way to lose me as a customer, TBH, is to disrespect my fiercely-guarded attention span with prompts to spend money while I'm busy being focused on making it.
faizmokhtar
Last I checked, the push notifications that are masquerading as native popup asking user to install “antivirus” are all on web.
makeitdouble
Can’t she revoke it from the notification screen when she sees a spammy one ?
Sure it’s still better to never subscribe to unwanted notifications, but removing them isn’t much of a hassle in the current system IMO
spondyl
My parents are in the same boat. Revoking it assumes the user even has a mental model of what a notification is. That is: Something that you can opt out of or even necessarily that they gave permission in the first place. I suppose it's viewed a bit like receiving junk mail or advertisements on TV. That might seem absurd on the face of it like of course it's your device but not everyone is necessarily aware that they even have any agency (or are interested in learning yet more "computer nonsense")
I'm being a bit over the top here but I consider it much the same problem as how you might use a car without understanding any of how it works. In the same way, plenty of people own mobile phones without any understanding of cause and effect.
I'm pretty sure my parents don't even "see" permission prompts, they just sort of have this "thing" in the way of the "screen" and tap at it to go away rather than y'know, some sort of two way consent dialogue.
ocdtrekkie
Nobody who doesn't work in the industry knows how to do this. Browser site permissions are basically the absolutely most incomprehensible UI ever to ordinary users. It's why implementing these features without an app install is user hostile.
pier25
It's a good restriction although I wish Apple helped a bit with the installation of web apps to the home screen.
Not install prompt banners like in Android* but right now you have to use the Share screen. It almost feels like Apple is hiding that functionality so that users don't find it. Installing and sharing are two very different actions.
* I'm an android user and I agree these are bad.
Gigachad
For people who haven't used iOS, the Share screen is the ios junk draw where every option they couldn't find a better place to put something goes. Things like Find on page are located there too.
tomduncalf
FYI you can just type in the address bar and a “find in page” option appears in the autocomplete list if that text is on the page, no need to use the share screen
fiddlerwoaroof
I disagree, the “share screen” is the logical place for actions that operate on the object you’re currently looking at. Adding a new banner or something for installing PWAs would just clutter up the UI and make it less consistent.
isametry
You’re not wrong, however they’ve actually been cutting down on that lately — moving the items which aren’t really “sharing” in any sense to a kebab / ellipsis.
The best example is Photos, where the Share Sheet would have a LOT of unrelated junk — Duplicate, Hide, Slideshow… But as of one or two major versions ago, there’s now an ellipsis menu to keep those options instead. Notes got the same treatment.
In current Safari, the “aA” menu is an equivalent of that. In my opinion, “Find on page” is really the only option on that Share Sheet which doesn’t really belong. All the others make sense, as they’re an “Export” of the page in some way or another.
layer8
It’s more like what would be the context menu in a traditional desktop GUI.
throwanem
"Share sheet" is a bit historical in my opinion, and has been for some time. In practice it serves as more of an OS-level context menu that happens to put the "send to frequent contacts" and "open in another app" options first.
In theory Safari's tab context menu would be a better fit, but given it iconifies as a "change text size" tool, I don't know if that would really address your concern at all.
donbrae
I’ve long been hoping for something like the Smart App Banners[0] that native app developers can use to link to their app in the App Store.
It’s relatively unobtrusive and easy for users to dismiss.
[0] https://developer.apple.com/documentation/webkit/promoting_a...
LeanderK
yes! Smart App Banners are really great and I just wished they would be available for PWAs
nvrspyx
Now if only they'd create a separate folder for web apps in the App Library to put them in instead of requiring that they be on the Home Screen.
thekingshorses
And reinstall it like native apps on factory reset or transfer like native apps to a new device.
Someone
You can get close: put them in a folder on your Home Screen.
Disadvantages:
- cannot hide that folder in the App Library
- limited number of shortcuts per folder
extra88
I don't think there is a limit to how many apps icons can be in an iOS folder, they're paginated. Right now, I have 27 in an "Apple" folder, spread over 3 pages. If I add another icon, it adds another page.
alwillis
> Now if only they'd create a separate folder for web apps in the App Library to put them in instead of requiring that they be on the Home Screen.
Could be a feature of iOS 17, which will be available to developers at WWDC in June.
nvrspyx
It could, but I won't hold my breath. I've fallen into the trap of being optimistic that some annoyance will be fixed or some obvious improvement will be implemented in iOS <next_version> multiple times and ending up disappointed. I'm even less hopeful of anything that would improve PWAs, whether in terms of API support or user experience, due to Apple's incentive to keep them second-class.
KyeRussell
Yes, like it is every year. Shovelware blog tier speculation.
yamtaddle
Oh thank god. I was worried it'd let sites ask without the user first taking some action to permit it. Sites being able to pop "allow notifications?" without the user first indicating they might want that, on desktop, is a menace.
PossiblyKyle
My mother has an Android phone, and she’s not really tech savvy. Her notifications are absolutely bombarded with garbage from various websites, and her lock screen displays ads. I’m moving her to iOS, as I’m quite sick of constantly being the IT guy.
philliphaydon
Oh I can relate to this. Bought my mum an android phone when my daughter was born so I could share photos and do video calls.
It was such a hassle doing support over the phone (She lives in NZ and I was in Singapore, and now Taiwan)
Bought her an iPhone 12. Apple support helped her set it up over the phone. 2 years and I haven’t played IT guy once!
duxup
Yeah absolutely this has to be a limitation.
I do not want to have to go chasing “where did this annoying notification come from” game… ever.
wartijn_
Desktop browsers don't have this limitation and I never have to play that game. It's just a stetting where you can choose to allow websites to ask for notification permission, or block it from every website.
waboremo
Part of the problem for desktop browsers (except for power users) is that they've never opened the settings option, not once. They might have opened Mac's system preferences or Windows Settings app but other than that they have no idea they can toggle a plethora of options for their browser.
yamtaddle
Check in with the average user of desktop browsers. You may find a lot of them have accidentally accepted web pushes and have no idea how to make them go away.
I'd be shocked if the vast majority of "use" of the "feature" weren't exactly that kind of spammy, unwanted messaging.
interpol_p
I dislike the desktop implementation of push permission request in macOS Safari
It presents a modal popup asking for permission. A few times I have accidentally clicked "Allow" only to have to hunt through my notification settings for the offending website to remove it
Web sites should not be allowed to present modal, native UI that can interrupt the browser. They should be contained to their window
A better implementation would be to allow the browser to show a bell or other icon in the main UI indicating the website offers push notifications. Clicking on that would inform and allow the user to opt-in
barnabee
My desktop browsers get denied permission to show notifications at the OS level and are set to block them for all sites without asking.
I can't think of a single valid use case for them. There are only a handful of desktop apps (literally 4 or 5 apps like MeetingBar) that I allow to use notifications on desktop. For essential messaging app, etc. that I need notifications on, I configure them to be only on my phone, which I can just turn over if I don't want to see them.
This new iOS functionality therefore fits perfectly with how I use notifications: if I install the website like a mobile app, it can maybe get notifications, otherwise websites can't bother me even with requests to show them.
dmonitor
it’s constantly abused by spam trying to masquerade as the browser because the prompt extends below the line of death
undefined
spandrew
Ya. It's safe to assume if someone is opting to add a website to their homescreen they are interested in it; notifications may make sense. Random websites asking me to enable desktop notifications are annoying. This prevents that for mobile.
mrtksn
Very sensible limitation, otherwise we would just have another dialog to deny or accept on every website.
hajile
> Added support for WASM SIMD.
This is huge for the progress of WASM
> Added support for growable SharedArrayBuffer.
Not a headliner feature, but a pretty important one for JS/WASM interactions.
> Added support for AVIF on macOS Monterey and macOS Big Sur.
> Added support for the AV1 codec in the MediaCapabilities API.
> Added WebRTC support for hardware AV1 decoding on supported device configurations.
Could this be the first indication of Apple warming to AV1?
> Added support for the Notification API in dedicated workers.
> Added support for Service Workers and Shared Workers to the Permissions API.
> Added support for the termination of nested workers.
Nice to see web workers finally getting some love
> Added support for CSS Typed OM.
A great feature and should help with performance from not having to do constant number->string->number
brrrrrm
> huge for the progress of WASM
HUGE! 4x speedup for anything parallelizable. This should bring around ~45GFlops out of the box in the iPhone browser, which isn't much but easily enough for basic neural networks (think object tracking, background segmentation, face feature tracking). For comparison, WebGPU would get that to ~1000GFlops
hajile
This is huge for CPU workloads that need intermittent parallel processing.
A great example would be JSON parsing in WASM apps where SIMD algorithms result in massive speedups.
Another example would be a WASM software decoder could allow AV1 playback content on iOS browsers.
BluSyn
> Added WebRTC support for hardware AV1 decoding on supported device configurations.
Currently no Apple device has hardware AV1 decoding, so why support it in Safari iOS Beta? Perhaps next CPUs (A17 and M3) will have dedicated AV1-decoding hardware? Either way I think this is a hint it may be supported soon.
Great news!
MBCook
They may still be able to offer optimized decoding with hardware support on older devices. Not a full hardware path but a very well optimized CPU + hardware combo.
undefined
latexr
> Could this be the first indication of Apple warming to AV1?
That was half a decade ago, when they joined the Alliance for Open Media: https://9to5mac.com/2018/01/04/apple-alliance-for-open-media...
fuckelonmusk
[dead]
least
I'm already dumbfounded by the number of notifications I see pop up on relative's screens, this can only add to it. My default is to not allow notifications unless the application has a very good reason for needing it, and even then if they abuse that the notifications get turned back off.
It's one of many moves Apple is making in what I'm assuming is to assuage antitrust concerns. I think it's an overall good because having choice is good, but I do suspect I'll start seeing even more spam on people's notifications as a result.
om2
Good news! You'll only get notifications if you save a web app to your homscreen and then explicitly give it permission. And then you can choose to limit it to only badging, as with native iOS apps. Or you can use focus modes to manage which notifications you can get in different situations, as with native iOS apps. We've been careful to minimize the risk of notification overload as much as we can.
least
I'm glad that there's controls in place to help minimize the issue, but I also know that companies do a good job of making people think that they need to enable settings on their phones that they don't.
That's of course not in Apple's control, it's just a meaningful downside to opening up push notifications to web apps on iOS. The utility for the few apps that can really benefit from this probably outweighs the downsides, but I've seen other people's phones and know it will also, and possibly mostly, only contribute to more spam.
fundad
they thought of everything huh?
Eduard
But it's bad news!
I can think of so many valid and proven use cases for notifications.
Requiring to first save a web app locally in order to actually benefit from its full feature set is bad UX. Apple.
sercand
I am wondering what is the use case for a website that sends notification to the user who didn't install the PWA to home screen.
om2
Going by this thread, more people seem grateful than upset about this UX.
lxgr
I completely agree about notification spam being an issue, but why should native apps get a head start over PWAs here?
There are many native apps on my phone that abuse notifications for spamming (often by not having an option that disables marketing while keeping e.g. delivery notifications active, which means blocking everything is sometimes not an option), but at the same time, there are some websites where I'd really like getting notifications (and notifications are in fact the only reason I have their app installed!).
least
> I completely agree about notification spam being an issue, but why should native apps get a head start over PWAs here?
They shouldn't, which is why I think this is an overall positive change. It's mostly that when you add ways people can receive notifications, it can only increase the amount of notifications you can get, not reduce it, and notifications for most applications have at best dubious utility for the end user.
Web apps are also not beholden to the app store rules, so I think they at least have slightly higher chance of being abused, not that the app store prevents companies like Uber from spamming you with advertisements and bundling them with delivery notifications, like you mentioned.
rahoulb
However with a native app, you've chosen to install it, so you're at least partially interested in its notifications. With a website, you may just have browsed to it and have no intention of ever returning again. So the point of having to "install" the PWA to your home-screen mimics that first stage of intention.
The key issue (as many others have noted) is that the "installation" step is still somewhat arcane.
thewebcount
The difference is that Apple has rules about what can going into App notifications, and if developers don't follow the rules they can kick the app out of the App Store. (Not saying they couldn't be better about this, but it's at least an option even if it's not perfect.) But they'll have no control over what notifications from web pages you've put on your home screen show. It will make notifications a worse experience for users all around.
KyeRussell
Apple has rules surrounding using push notifications for marketing uses, yes. They haven’t enforced them for a decade. Apple’s own apps are guilty of blatant rule violations. Not to say that there’s any expectation that Apple would follow their own rules. Rather that the company doesn’t see the value in following them. So. In the hypothetical universe where they still cared, sure. But we aren’t in that universe.
ntauthority
> But they'll have no control over what notifications from web pages you've put on your home screen show.
They own the browser. They can theoretically maintain a list of bad origins just as much as they can block an app from the App Store.
Turing_Machine
> The difference is that Apple has rules about what can going into App notifications,
They aren't very effective, then. I'd love to have a way to let (e.g.) food delivery apps tell me when my food is arriving, without letting them spam me 30 times a week with "special offers".
lxgr
Unfortunately, these rules primarily serve Apple, not me as a user.
jaywalk
Apple doesn't even follow their own rules on this.
tech234a
It requires adding the app your Home Screen first.
neither_color
I'm like you I disable almost all notifications by default. For some pesky apps that try to be cheeky about it, like Uber Eats requiring notifications but then not letting you opt out of promotional ones, I turn them on only for the duration of my order.
danShumway
Oh hey, bullying companies with threats of antitrust works. We should do that more often.
----
This is a really big deal, but it's also a little bittersweet, because Push Notifications very heavily motivate developers to introduce serverside components to apps that don't need them. Web Push is a standard where I can really see Google's influence, and I think it influenced the standard for the worse. It's a standard built around the way that Google and large companies build products, it's not built around indie development or hobby projects.
You can send a notification to whatever server is registered and it gets delivered to the phone, great. In contrast, there is no way for a PWA (unless something has changed since I last looked, in which case PLEASE tell me) to schedule a notification for the future without contacting a server. It's a bad direction to go for PWAs, given that the whole point is for them to be able to work offline.
And yes, sometimes you do need a serverside connection for things like message notifications, but there are a lot of uses for notifications where you know upfront what the notification needs to say and when it needs to be shown -- and that's not supported. In my opinion because Google doesn't really think about that kind of architecture and the idea that you wouldn't contact a server alongside every user action is foreign to them.
There was effort for a while to get offline alarms, scheduled notifications, even scheduled actions working through web workers, but as far as I know that stuff has all died off. It stinks, because I regularly run into scenarios where I could probably flat-out replace an app on my phone with a website, and I can't even on Android, because I'm unwilling to set up an account system and start tracking a bunch of data. I'm happy we have something, but I'm still remembering the parallel world we lost, where it would have been possible to have a much broader push towards completely offline PWAs that never transmitted user data anywhere. The idea of being able to replace native apps with a static Netlify page is very appealing to me.
And maybe that'll change? But I'm not holding my breath; it seems like a lot of companies have decided that push notifications are good enough and that they were going to require user accounts anyway.
xfalcox
> In contrast, there is no way for a PWA (unless something has changed since I last looked, in which case PLEASE* tell me) to schedule a notification for the future without contacting a server. It's a bad direction to go for PWAs, given that the whole point is for them to be able to work offline.
Looks like this effort died because of Android: https://bugs.chromium.org/p/chromium/issues/detail?id=891339
danShumway
Yeah, that was my impression as well. Every once and a while I check back to see if it's been picked up.
I really think Google made the Web Push standard worse, in multiple ways.
miohtama
I was curious about this and looks like you can do notifications with Web Workers, based on this Mozilla post
https://developer.mozilla.org/en-US/docs/Web/Progressive_web...
danShumway
Unfortunately, not schedulable as far as I know, the notification needs to be sent while the web worker is running. Again, I'd very much love be wrong about that, but I don't think there is any way for, just as an example, a habit tracking PWA to say "ask the user at 10:00AM every day if they've gone for a morning bike ride."
But you can get that behavior... if you set a web server and force the user to make an account and then log all of their habits in your server and then send out the notification yourself. Because... it's unfair for me to blame Google in this instance, I don't know it's their fault, but I do blame Google and I suspect it's their fault. I could be wrong though.
fuglede_
I don't know how fine grained you want your notifications to be, but you can get pretty far without storing user data by splitting notifications by topic on the queue, or by filtering client-side in the service worker itself.
But even then, the UX seems pretty bad; when I first created an app with web push, a few years ago, there was zero guarantee that notifications would ever show up, and they seemed to fall through very often, when the client (at least with Firefox Android) sits in the background; https://stackoverflow.com/q/60809681
i can't tell if the situation has improved recently -- anecdotally it seems like it's a bit better now -- but depending on what sort of notifications you want to push, that quickly becomes a complete showstopper.
kevincox
You don't need an account and you can encrypt the message before queuing it on the server. Silly stupidity inefficient and won't work offline but it is quite easy to make a generic push message scheduling server that just pushes around blobs as requested by client-side code.
twism
Google Firestore?
danShumway
Am I missing something? Firestore is an online database that requires setting up a Google account. It's sort of like responding to "I wish I didn't need to include a serverside component" with "Linode".
mvac
Web Push is probably the worst feature ever introduced to the web. I see way too many spammy notififications on PC's of my non-technical friends and parents. Glad that Apple has decided to only allow Web Push for websites added to the home screen.
postalrat
Web push or the notifications API? They both do about the same thing but web push can happen even if your browsers are closed and the phone is locked.
LeanderK
I don't get why apple does not take a similiar path on mac. Some websites are really apps for me (stuff like overleaf). I would gladly add them as apps and use this to unlock all those advanced functionality. But so far, at least on safari for mac, all those web-push websites are mostly spam. I only have a few where it is useful but I use them, again, like normal apps, and would be fine of adding them to my library.
Nobody uses the mac app-store anyway, so why bother? Why not do it?
smoldesu
Sounds like this is the motivation Apple needs to bring their notification-handling into the next century. I'd love for Apple to give me a way to disable "Try the New Safari!" notifications without opening my terminal.
MBCook
Web push, badging, saving to the home screen from other browsers, and lots more.
I can’t wait to hear 6 months from now how the goalposts have moved again and some other feature no one ever complained about is now what Apple is using to destroy PWAs that would be ultra-popular if Apple would just add support.
It happens every time.
quitit
Something which developers have widely refused to embrace despite being pushed by Steve Jobs himself during the iPhone keynote. Yet somehow it's always Apple holding it back with their magical minority market share.
JimDabell
People have forgotten what a big deal that keynote was and what it meant for the mobile web. Go back and pay attention to the “desktop class web browser” stuff. Apple almost singlehandedly changed the mobile web from something almost nobody wanted, into something actually useful and mainstream. And Steve Jobs was there right from the start telling everybody if they wanted to build applications for the iPhone, they should be mobile web applications. It was everybody else demanding that iPhone applications be native, not web-based.
Before the iPhone was released, a typical mobile web experience was a separate site that barely worked and didn’t use any normal browser technologies. Along come Apple, who do a tonne of work to make their open-source WebKit work well on mobile, and virtually overnight all smartphones adopted WebKit to catch up with them.
Anybody who doesn’t think Apple has done more to advance the mobile web than practically any other organisation should be forced to build WAP/WML mobile sites until they repent.
They didn’t do it alone of course – WebKit was originally based upon KHTML, and I believe Nokia also had a WebKit-based mobile browser. But Apple put a tremendous amount of work into it and the dramatic shift from “the mobile web is shitty and worthless” to “the mobile web is actually useful” happened almost straight away as a direct result. Nobody wanted mobile websites / mobile web applications before the iPhone came out, then all of a sudden it was a normal requirement for a site to work well on mobile.
MBCook
There have certainly been functions that were necessary for some kinds of apps, but there are possibilities for kinds of PWAs that would have worked for years on iOS (and Android/desktop) but they barely exist if at all.
Unless some (unknown to me and possibly everyone) change happens and PWAs explode in popularity… there’s going to have to be a reckoning that end users just don’t seem to care/want them.
They can still be useful but the dream of abandoning the app stores (due to PWAs) just doesn’t feel realistic to me.
BeFlatXIII
> magical minority market share
This phrase is far more prescient than most people think. Yes, it's a numeric minority. However, they have a near-monopoly on _profitable_ users. 13% of the global market and >50% of the profits.
seanabrahams
Dreams do come true (https://news.ycombinator.com/item?id=22687913). Even more:
> You do not need to be a member of the Apple Developer Program to use it.
Wow.
Alifatisk
That is incredible. I guess PWA is getting closer to success.
cronix
I'm pleasantly surprised by this news. I never thought Apple would do this and have been quite critical of them over the years due to it. For years they've really been holding up progress with PWA. I think a majority of the apps we see are really just glorified wrappers around websites anyway, or not needing more resources/tech than a website would, except bloated up to 100megs for each app because we can't just use the web browser already installed and all of the time and money wasted getting it into the app store when it should be just freely accessible via the web.
WastingMyTime89
> I'm pleasantly surprised by this news. I never thought Apple would do this and have been quite critical of them over the years due to it.
The EU is forcing them to allow side loading so they are racing against the clock to try to bring WebKit to a point where everyone is not just going to switch to Chrome overnight when that happens.
robertoandred
99.9% of people would not switch to Chrome overnight. They don’t know or care what a rendering engine is.
WastingMyTime89
They don’t need to know. They just need to click on the banner which will be on every Google search result pages. How do you think Chrome got its market share on the desktop?
fragmede
4.47% of them don't have to - they're already on Chrome on iOS.
fabrice_d
In general yes, but web push is kind of the exception there because this API needs OS level support to wake up apps. Switching to a blink based browser would not help with that.
yoavm
Why not? If you run Chrome (or Firefox) on iOS, can't the app ask for notification access using the normal OS API? It will then "lend" this functionality to websites, so that when they have an update you'll get a notification from Chrome saying "Website X: Hello world".
Eduard
Are you talking about Apples walled garden app store or are you talking about the Aplpe-enforced webkit browser monopoly in iOS?
Or are they Effectively dependant on each other?
sublinear
> should be just freely accessible via the web
Yes this is a significant hammer blow against native apps on iOS, but I don't think this would reduce cost for the consumer. I might be misunderstanding what you mean by "freely accessible" though. Definitely is more convenient for the same web app to be available everywhere.
nine_k
Freely accessible as in not vetted by Apple. No approval process, no need to pay $100/year, no need to buy a Mac. (Also, gone would be the 30% Apple tax on "in-app" payments.)
geysersam
No need to maintain multiple versions of applications for different platforms.
ffritz
Let’s see if they still do want your $100 by requiring it for their Push Notifications API.
dmitriid
> Yes this is a significant hammer blow against native apps on iOS
Funny how this significant blow never happened on the world's most dominant OS where all the restrictions that HN loves to whine about don't exist.
cma
Meta's PWA announcement was pretty shocking: they are going to take a 30% cut from PWAs and require they go through their Quest store.
jonny_eh
> because we can't just use the web browser already installed
True on Mac, not on iOS. Apple doesn't let you ship custom web renderers. You need to use the system's built-in one. This applies to browsers such as Chrome and Firefox too!
throw03172019
I believe they are goi g to allow custom engines going forward.
Source: https://www.macrumors.com/2023/02/07/mozilla-developing-non-...
undefined
CodeIsTheEnd
A personal gripe with progressive web apps: they cache the website!!
A lot of people have requested that I make a progressive web app for https://plaintextsports.com. I've looked into it, but it fundamentally doesn't work, because it caches the home page. My website doesn't load any data via JavaScript; it just relies on the HTML page updating every 30 seconds, so when the home page is cached, the website just stops working.
I don't want this service worker nonsense. In most cases offline access isn't useful; people want the live scores. (It'd be moderately useful for viewing schedules offline, but I think most people use it for live scores.) I just want the website to show up as its own app in the app switcher, and basically nothing else to change: I still want the swipe-to-go-back gesture to still work. I still want the address bar with the manual refresh button. But I can't do that.
It's frustrating that they've provided a way to make a certain style of websites into first-class apps, but it doesn't work for the most basic websites!!
Side note: this is partially a the-best-way-to-get-a-question-answered-on-the-internet-is-to-say-something-wrong post. If there's a way to make it a PWA and not have all the pages heavily cached, please let me know! I would love to be wrong on this. (Unfortunately my noprocast just triggered though, so I won't be able to edit this post or respond for the next three hours.)
m5r
Your service worker dictates what the browser should cache. You could cache static assets only and let the browser hit the server for document requests. As for the refresh button, mobile users are now used to pull to refresh so you might not need an actual refresh button.
As an aside, I dig the design! It reminds of teletext haha
coder543
It has been awhile since I've personally tried creating a PWA, but I don't think iOS does any form of extra caching for PWAs. I think it is more likely that you copy/pasted an example service worker that was caching things you didn't expect it to cache. Some info about PWA caching here[0].
That page also talks about "What to Cache" here[1], and it specifically suggests that most apps will want to cache the main page's HTML.
Now that iOS will supports push notifications in PWAs, I definitely plan to try out the developer experience again soon.
> I still want the address bar with the manual refresh button. But I can't do that.
Yeah, I mean... you're meant to provide an app-like experience if you're doing a PWA. You could certainly build your own stylized, floating bar that only shows up in PWA mode, or think about new ways to let users control the way the page updates. Alternatively, you could just automatically refresh the page with a setTimeout?
I'm not sure how much you want to invest in experimenting with the technical foundations of your app, but I wrote out a few ideas that occur to me:
- Your Cache-Control header is kind of weird. `max-age=15`. I would expect to at least see a `public` or `private` directive in there to specify how this data is supposed to be handled by intermediate proxies. Something like your website is a prime candidate for caching in a CDN layer, and I think you generally want to specify `public` for CDNs to do anything useful. Maybe they default to `public`? I've honestly never felt the need to try. Beyond the `public` / `private` discussion, `stale-if-error` could be useful so the CDN could serve the most recent info even if your application is having a brief outage. If you're not using a CDN... probably something worth checking into.
- As cool as just serving self-contained HTML document is, your page is still transferring 6 kilobytes each time it refreshes. If the goal is to lower that as much as possible, I would start by pointing out that you don't need to send your JavaScript snippet every single time the page loads. It looks to be several thousand bytes uncompressed, although I'm not sure exactly how much it is affecting your compressed payload size. You could separate that into an aggressively cached JavaScript file that is served separately from the HTML. (As usual, best practice is to have a file hash in the name of the javascript file, that way the cache time can be infinite. If the javascript needs to be updated, the hash would change, so the browser wouldn't have that cached, and would fetch the new file immediately, as soon as the refreshed HTML file requests it.)
- But then after that... the next logical step is to render the actual score interface client-side, since the score data is significantly smaller than the HTML needed to render the score data. This would also allow you to handle refreshing more elegantly from the client by just fetching the data route that returns a JSON blob, and re-rendering the HTML. At this point, the HTML representing the empty app shell could be cached too, but it would probably be best to limit the cache duration depending on your preferences. The right value for HTML caching would likely be somewhere between a few minutes and a few days. Now, opening the app would load the locally cached HTML and JavaScript, and then the JavaScript would just fetch the tiny blob containing only the scores and nothing else. Of course, you could cache this information locally so that when the PWA is opened, the user can always see the last information (and when it was fetched) even if they don't have an internet connection, while the PWA can continue trying to fetch the updated scores.
- Taking this to the extreme, the maximally efficient design for something like this would probably involve an SSE (server sent events) endpoint that the client would subscribe to. Whenever the scores actually do change, the server could push that straight down to the client. This would reduce the latency from your current 30 second target, and it would also use even less data since people aren't refreshing and receiving the same stale data multiple times. (I will note that a good implementation of this would still send a tiny ping from server to client every minute or two just to ensure the connection doesn't get silently dropped by any weirdly configured firewalls along the way.)
- If you were really going all-in on features, well... this whole HN discussion is highly focused on push notifications, so you could always let people subscribe to specific teams, and send them a push notification when scores change for those teams.
zxcvbn4038
I think this is a good development. I'd rather my "app" be chunk of wasm running in a browser window then have to deal with all the drama that comes with dealing with the various app stores. Its not a universal solution but it would work for a lot of apps. Most of the non-game apps seem to be just a web widget anyway.
osrec
I can't believe they've finally added this. Been waiting at least 8 years.
jonny_eh
Some of us have been waiting 15 years.
alexklarjr
[flagged]
Get the top HN stories in your inbox every day.
I have been waiting for this for years! Now the only thing that's really missing is an install prompt. I wonder how long we have to wait, the install prompt is crucial, but I view Apples reluctance to implement the install prompt as politically driven. They want to favour their AppStore and make installing Web Apps unnecessarily hard.
Edit: It's been three years since I have last dabbled with PWAs. What has been the recent experience?