Can't register periodic sync in service worker #4662
Unanswered
simonferndriger
asked this question in
1. Help
Replies: 4 comments
-
Full code: |
Beta Was this translation helpful? Give feedback.
0 replies
-
Service Worker |
Beta Was this translation helpful? Give feedback.
0 replies
-
|
The only console output I get is the one from pressing the test button:
|
Beta Was this translation helpful? Give feedback.
0 replies
-
|
I used a different name for the tag and it works now... |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment

Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I register the service worker at the very top of my app.js like this:
if('serviceWorker' in navigator) window.sw = navigator.serviceWorker.register('serviceworker.js', { type: 'module' }) .then(() => navigator.serviceWorker.ready) ;Then I try to register a periodic sync like this:
sw.then(reg => reg.periodicSync.register('notification-check', { minInterval: 24 * 60 * 60 * 1000 })Nothing happens, no warning, no error and also no event in the service worker. I assume it probably has nothing to do with AlpineJS, but since I ran out of things to check otherwise at https://stackoverflow.com/questions/79728229/serviceworker-not-reacting-on-periodicsync-event I hope it's OK to ask nevertheless?
Beta Was this translation helpful? Give feedback.
All reactions