I am using Notification.permission for check whether the browser allows notification or not.
my code for check Notification permission like below.
// Let's check if the browser supports notifications
if (!("Notification" in window)) {
alert("This browser does not support desktop notification");
}
var prm = Notification.permission;
if (prm == 'default' || prm == 'denied') {
console.log("permission denied or default");
}else{
console.log("permission granted");
}
This code is working fine in my localhost but when I try to use in production it will always give denied status.
my browser settings for notification is always allows on this site.
but I do not figure out what is the problem.
help needed.
