2 ms·
> 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
by 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.