4 ms·
Notifications can be useful for web apps. A good rule of thumb is to only ask for permission when the user interacts with your app. For example, I ask for permi
by pubb 9y ago
Notifications can be useful for web apps. A good rule of thumb is to only ask for permission when the user interacts with your app. For example, I ask for permission when the user clicks a button with the text "Enable Push Notifications" on the user settings screen. Then I let the user choose what kind of notifications they'd like to receive - typically CRUD actions for entities that the user cares about.
- JoshTriplett 9y ago> A good rule of thumb is to only ask for permission when the user interacts with your app. For example, I ask for permission when the user clicks a button with the text "Enable Push Notifications" on the user settings screen. This is absolutely the right way to do it. A little unobtrusive in-page suggestion to enable notifications is not a problem; I've enabled them for Slack via such a notification, for instance. But I'm never going to grant a site notification permission if it pops up the browser permission dialog without interaction.