- Issue created by @2dareis2do
- 🇬🇧United Kingdom 2dareis2do
Ok I have managed to get service workers working in safari. As soon as I added scope the notifications kicked in.
See
https://gist.github.com/Rich-Harris/fd6c3c73e6e707e312d7c5d7d0f3b2f9?per...
I spent over an hour trying to figure out why the fetch event wasn't firing. The service worker must be in the root directory / for fetch to fire on that root "scope". I had /js/sw.js as the service worker and had to move to /sw.js.
The odd thing was it seemed to work when first registering?
- 🇬🇧United Kingdom 2dareis2do
Ok, I am a bit confused. I now realise the notifications are sent on cron run. Not sure if adding scope is necessary or or not.
I also notice you can add notification for both www and domain.