Home:ALL Converter>safari notification permission always return 'default' after relaunching even the website has allowed notification before

safari notification permission always return 'default' after relaunching even the website has allowed notification before

Ask Time:2019-09-05T10:04:56         Author:Alessia

Json Formatter

My safari version: Version 12.1.1 (14607.2.6.1.1)

Say I am on website A, and I use Notification.requestPermission() to allow the notification on it.

Then I quit safari, relaunch it and open website A again, I use Notification.permission to get current permission, it always return 'default', even though I can see in the Preferences->Notifications that website A has allowed notification.

Ultimate purpose: I need to know correct permission to determine if I need to show some toast for user.

Author:Alessia,eproduced under the CC 4.0 BY-SA copyright license with a link to the original source and this disclaimer.
Link to original article:https://stackoverflow.com/questions/57797545/safari-notification-permission-always-return-default-after-relaunching-even-th
yy