最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

javascript - Firebase messaging error: messagingpermission-blocked - Stack Overflow

programmeradmin0浏览0评论

What could be the cause of this error messaging/permission-blocked in firebase messaging. Im getting this error when I try to ask for permission to receive notifications on the web

What could be the cause of this error messaging/permission-blocked in firebase messaging. Im getting this error when I try to ask for permission to receive notifications on the web

Share Improve this question edited Feb 20, 2017 at 15:22 Frank van Puffelen 601k85 gold badges890 silver badges860 bronze badges asked Feb 20, 2017 at 11:12 Tevin ThukuTevin Thuku 4471 gold badge9 silver badges19 bronze badges
Add a ment  | 

1 Answer 1

Reset to default 2

The error indicates that the user has blocked your site from receiving push notifications on a browser level.

If this occurs for...

  • You, you'll have to check your browser settings and unblock the site.
  • A user then you are out of luck, your site is blocked indefinitely.

Do not be annoying about asking for permission. Blocking your site (indefinitely) is a very easy step for a user to take. Once they click it, your done. The likelihood of you getting them to unblock your site is next to nothing.

The UX around asking for permission should look something like this:

  1. Ask for permission on an app level, explaining why the app wants to use this feature.

  2. If the user accepts, ask for permission on a browser level.

  3. If the user declines, dismiss the prompt. Add a setting in your app where the user can activate push notifications in the future should they change their mind.

This is a great article explaining the importance of carefully designing your UX if you want to use push notifications for your web app.

发布评论

评论列表(0)

  1. 暂无评论