The iOS implementation doesn't allow this. You have to add the app to your homescreen (i.e. "install" it) to allow it to even request permissions. This is actually for web apps.
I'm aware of that. iOS is a proprietary OS and how it does things isn't all that relevant to me in this context. The web is a different matter and I've yet to see a use case of push notifications that served me. But I've seen 100's of websites that I have zero reason to see as useful applications trying to trick me into allowing them to use push notifications.
The context here is that Safari (incl. mobile safari) just added support. Every other browser has supported this for years. I agree that the implementation in Chrome that allows websites to request notification permissions on any page load is pretty annoying. But this UI is not a necessary part of this feature.
From an android POV, the benefit of this feature is that it allows you to install fully featured apps while keeping them in the web sandbox where you have fine-grained control over permissions.
> I agree that the implementation in Chrome that allows websites to request notification permissions on any page load is pretty annoying.
FF does pretty much the same thing.
With phone apps I sort of get it: you are already installing something and clearly have a long-term relationship with the provider of such an app and the app likely has functionality that you need badly enough that having the app alert you makes sense.
But for me the web is 'transient', even as the maker of a SPA I wouldn't dream of bugging my users outside of their own decision to come back to the site. All this needy software is - to me - just a source of irritation.
When I last checked a few years ago, self-hosted Discourse forums needed to self-publish an app to have push notifications on iOS. Hopefully that won't be the case anymore, it's a great community communications platform.
You can prevent them from asking you by turning off that feature in the browser settings. It’s the 2nd thing I do when I sit down in front of a computer for the first time. (First is install ublock-origin).