⏰ Periodic Background Sync

What is Periodic Background Sync?

The Periodic Background Sync API allows a service worker to run tasks at periodic intervals, even when the user isn't actively using the page. Unlike regular Background Sync (which fires once when connectivity returns), periodic sync fires repeatedly on a schedule.

Use cases: Syncing news feed, updating cached data, checking for new content, etc.

⚠️ Browser Support & Requirements

Live Demo

Status: Ready

Choose sync interval:

1 minute
(testing only)
1 hour
(minimum practical)
12 hours
(good for news)
24 hours
(daily updates)

Event Log

🔧 DevTools: Inspecting Periodic Sync

  1. Open DevTools → Application panel
  2. Expand Background services → click Periodic Background Sync
  3. Click the record button (⏺) to start recording
  4. Register a periodic sync and observe the events
  5. You can also see the registered tags in the Service Workers section
  6. Tip: You can manually trigger a periodicsync event from the Service Workers panel by entering the tag name and clicking "Periodic Sync"

📝 Practice Exercise

  1. Start recording periodic sync events in the Application panel
  2. Register a periodic sync with a 1-minute interval
  3. Check the registered tags — is your sync registered?
  4. Go to Application → Service Workers and manually trigger the periodicsync event
  5. Unregister the sync and verify the tags are cleared
  6. Check the permission status — is periodic sync allowed for this site?