PeriodicSyncManager: unregister() method
The unregister()
method of the PeriodicSyncManager
interface unregisters the periodic sync request corresponding to the specified tag and returns a Promise
that resolves when unregistration completes.
Syntax
Parameters
-
tag
-
The unique String
descriptor for the specific background sync.
Return value
Exceptions
Examples
The following example removes a periodic sync to stop syncing articles in the background.
navigator.serviceWorker.ready.then((registration) => {
registration.periodicSync.unregister("get-latest-news");
});
Specifications
Browser compatibility
|
Desktop |
Mobile |
|
Chrome |
Edge |
Firefox |
Internet Explorer |
Opera |
Safari |
WebView Android |
Chrome Android |
Firefox for Android |
Opera Android |
Safari on IOS |
Samsung Internet |
unregister |
80 |
80 |
No |
No |
67 |
No |
No |
80 |
No |
57 |
No |
13.0 |
See also