-
Notifications
You must be signed in to change notification settings - Fork 28
Require user gesture to request notification permissions #49
Comments
I don't think this would help. Many sites are now switching to a 2 step flow. One app layer popup (that cannot be permanently dismissed) and which after click opens the system UI. This is just as annoying and it would not be blocked by requiring a user action. |
Yeah, interstitial popups are a whole other issue. None of the examples I listed above use that solution though, so I still think requiring a user gesture would be helpful to at least prevent those cases. That said, you do raise a good point: if notification prompts are changed to require a user gesture will sites respond by adopting an even more annoying interstitial pop-up prompt to ask users to enable notifications? I'm hoping that many of the sites that currently prompt for notifications without a user gesture are just being lazy; implementing the simplest possible solution while ignorant about how annoying that behavior is. In such a case, I imagine the site would be hesitant to deploy a solution like interstitial pop-ups that's much more obviously obnoxious to their users. Meanwhile the sites brazen enough to use interstitial pop-ups are already doing so for other reasons (like "Sign up for our newsletter!") and don't need any technical reason to do so. That's what I'm hoping anyway. It's kinda hard to make predictions about the future actions of site operators without having any data to base those predictions on. |
We (Chrome) are actually planning some experiments to move in the direction of making this more restricted. It's very annoying indeed, and as more developers adopt push notifications the problem is getting more severe. The idea is to require the user to have some engagement with the site before it can request permission—what we call site engagement score, unless there is a user gesture. Requests would be settled with default indicating that the user dismissed the prompt without making a decision, avoiding sites from either displaying a full-page overlay until the user makes a decision, or displaying an overlay informing the user how to undo their previous decision. User gestures are significant, because many sites delegate to push aggregators for distributing their notifications. Such aggregators live on origins that the user won't have visited before, while they are more likely to actually want to opt-in at that point. In the very long past (Chrome ~32) we actually did require a user gesture for all notification permission requests, but we found that this was inconsistent with other permissions, and also that many sites worked around this restriction by having a full-screen transparent Other ideas are most welcome of course! We're still very much investigating :). |
One thing to note. A few vendors (including us) that provide a hosted push notification service for customers who have not moved to HTTPS everywhere, and therefore cannot use service worker, are dependent on triggering notification request without a gesture as a workaround. User flow:
In step 4, we are triggering the request without a user request directly, as that was done on the previous step/site. Adding this intervention will essentially kill this equivalent offering from a few push vendors, most of whom are trying to follow the rules here. Examples of this include https://www.lancome-usa.com and http://www.extrastores.com/en-sa/ (which was featured as a developers.google.com case study) |
@beverloo if the site requires some level of engagement before subscription's possible, then I think it's important that code have some way to determine if that level has been reached. It's common practice for our customers' sites to show an initial prompt (or button, or other "non-intrusive" widget) asking the user if they would like to subscribe, similar to an invitation to subscribe for email updates. Answering yes to that prompt will then cause the request for notification permission. Obviously, if the request is going to be unsuccessful because the user hasn't engaged enough, then we don't want to show that initial prompt. |
On user gestures; it makes sense that requests for notification permission, or calls to |
@drewzboto With full respect for the work your team is doing, that seems like an anti-pattern. Centralizing push notification access with a single 3rd-party vendor would let vendors use sneaky tactics e.g. if a customer has allowed notifications for one site using a push vendor, they could offer other sites the ability to push without any opt-in at all. Looks like your app uses separate subdomains for each site, but that's essentially on the honor system and doesn't seem like a strong enough justification to avoid fixing this issue. |
@dylanpyle I don't think we're advocating not fixing this issue, just making sure this is rolled out at the right time. I just want to be clear on a few things to help vendors like us who are trying to do the right thing gradually:
Because of this, we're advocating that any intervention is rolled out slowly based on the uptake of HTTPs everywhere across sites, with enough of a published schedule for vendors like us to educate our customer base further with a mitigation plan. These things move slow, and it would be a shame to suddenly turn off the majority of our notification subscribers instead of working with our customers to educate them further on proper push notification etiquette while they get their systems ready |
@drewzboto I think that those enterprises should instead be pressuring their platforms to provide HTTPS. Is there some reason that HTTPS is so hard? I do know that there are difficulties related to links, but that can be solved by post-processing the HTML before it is served to the user. |
I am the founder of Pushpad and I am really interested in this discussion, because we want to recommend the best practices to our customers. Currently we let the developers choose when they want to trigger the prompt: they can prompt on page load or they can show the prompt when the user clicks a button or performs any other action. However many of our customers actually display the prompt on page load: even if this doesn't offer the best UX, probably it generates enough conversions. Probably if someone visits a website related to events, he already knows what kind of notifications he can expect... the same for an e-commerce, etc. Also, revoking the permission when you receive an unwanted notification is very easy. Is blocking the notifications on load the right solution? I don't think that this is the right solution, simply because this is what will happen:
I think that it is up to the developer to create the right UX, you cannot force them, because you won't achieve anything... The UX may become even worse. I think that blocking the notifications permanently if the user deny permission is already enough. Are there any alternatives? I agree that displaying the prompt on page load might not be the best solution. However, instead of blocking this behavior, I would prefer if browsers could implement a really valuable alternative... Example (it's only for brainstorming): browsers could display a small notification icon in the address bar for websites that ask permission for push notifications on page load, instead of displaying the prompt. Safari behavior It seems that Safari (desktop) 12.1 started blocking the prompts on page load. I think that Apple should take part in this conversation instead of breaking things without notice. If this behavior persists, probably we will start offering 2 step prompts to our customers, as many other providers already do... The problem is that customers will start asking us to offer that feature. It would be sad, because this is even worse in my opinion. On the other hand, if someone could suggest the right approach for a general widget, I would appreciate that. |
Related: |
(As noted in #72, we intend to archive this repository and are thus triaging and resolving all open issues) This is being tracked in whatwg/notifications#108 and both Firefox and Safari have implemented this, IIUC. |
One behavior I'm starting to notice with increasing frequency on the web is sites that immediately prompt users for permission to show desktop notifications the moment they land on the site.
This is very annoying and I nearly always immediately hit "Block", especially when it's just a random news article or forum post I got to through Google or Reddit. Personally I'd prefer if browsers would just ignore requests for this permission that occur automatically without any sort of user interaction.
As evidence that this is a problem, here's a short list of examples of sites that immediately prompt for notification permissions the moment you visit the site:
If you use Chrome, there's a pretty decent chance you can find numerous other examples by going to chrome://settings/content/notifications and looking through the list of sites you have set to explicitly block notifications from.
The text was updated successfully, but these errors were encountered: