I have a question, I'm implementing desktop notifications to allow users to see on site notifications while they are browsing another website. I have 2 options to ask for permission:
- Give the user an alert using sweet alert to explain why we need them and if they click yes give them the standard browser accept dialog (e.g. the blue bar on chrome) and show "Accept the notification at the top of this page to enable desktop notifications" in the same alert (sweetalert)
- Display the standard browser accept dialog (e.g. the blue bar on chrome) instantly and show a small alert at the top of the page explaining why we need the desktop notifications
Which one offers the best UX considering the user doesn't know a thing about desktop notifications? Please explain why you think so and what your answer is based on.
Thanks in advance!