Periodic Sync
Service Worker Functions
const ping = async () => {
const cache = await openCache('ping-cache');
const res = await fetch('/ping');
await cache.put('/ping', res.clone());
notifyPeriodicSyncClients('ping', { updated: true });
};
registerPeriodicSyncTask('ping', ping);Client Site Fucntions
Last updated
Was this helpful?