The notification prompt can only be triggered by a user gesture on some browsers

On some browsers, the permission prompt for notifications can be displayed only after a user interaction with the website. Let’s see why some browsers enforce this rule, what happens if you don’t comply with it and how can you implement a solution that works across all major browsers.

Read more