I want to implement push notifications on my website.

The obvious option is to simply show the prompt once the user lands on the page.

But is this a good practice? I read the EDGE is auto-blocking the prompt if enough people have chosen to block the prompt.

What's the take on this?

  • 2
    The best practice for this is to not do it.
    – njzk2
    Commented Apr 28, 2021 at 18:35

2 Answers 2


I assume you are talking about the built-in browser prompt that asks if the user wants to allow/block push notifications, as opposed to a custom solution of your own.

First of all, these are extremely annoying for the user and very obtrusive. Having one of these pop-up without me taking any action is an immediate "block".

The second problem is that there are only 2 options: Allow and Block. "Block" is a negative word. It's like saying that the site is spam, and it is no surprise that browsers are starting to treat it as spam.

So putting this at the very start of the site interaction is a bad idea. How can a user be expected to click "allow" when they haven't even been on your site long enough to know what they are agreeing to? You will almost always get a "block" in those instances.

I recommend that if you want to support push notifications on your site then you should make this a user options somewhere. Sure, you can "advertise" this feature on your landing page if you want to promote it, but let the user read some information about what it does and what type of notifications you will be sending. Then if the user wants them let them click a button and then you can prompt for confirmation. This way, they will almost always click on "allow" because they have already made the decision to do so.

I also suggest you keep in mind that (in my opinion) this feature won't be around for much longer. It is too easy to abuse for spammers and attackers and I expect this tactic of blocking sites with a bad reputation is likely just the first step in it's demise.

In summary. Don't automatically show the prompt. Provide the user with some information about what the notifications will do. Give the user the option to agree to them before the prompt it shown.


The best time to ask a user to allow push notifications is the moment when they understand that a notification would help them accomplish their intentions. That's usually not when the page loads. Users need to understand the value of the notification, which might otherwise be a potential nuisance. Examples:

  • The user ordered their first package from your site, and you offer to send a notification when it, and future packages, have been shipped
  • The user has bid on an auction item for the first time and might want to allow notifications to prevent from being outbid at the last minute

It's crucial to explain what the user will receive in return for allowing notifications before you show the permission dialog.

This article has some good suggestions and patterns for making opt-in less intrusive and more likely to be adopted.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.