Strange behavior with web notifications

user10236185 Source

I'm developing a pwa that uses web notifications (using the navigator.serviceWorker.registration.showNotification() method) and it works just fine when you first access the website/app, but it stops working the moment I try closing and reopening it. Any help would be really appreciated.

javascripthtml5progressive-web-apps

Answers

answered 1 month ago user10236185 #1

I just realized that the problem lies in the permission request for the notifications, appearing only after the notifications are allowed, so when you open the page and the notifications are already allowed, it just doesn't work.

comments powered by Disqus