Slide 1

Slide 1 text

Periodic Background Sync Periodic Background Sync

Slide 2

Slide 2 text

No content

Slide 3

Slide 3 text

Background Sync self.on('sync', (e) => { // retry failed request while // offline in background })

Slide 4

Slide 4 text

Periodic Background Sync self.on('periodic-sync', (e) => { // periodically refresh contents // up to date in background. })

Slide 5

Slide 5 text

Use Case - Podcast Feed Update

Slide 6

Slide 6 text

// register PBS const name = 'periodic-background-sync' const status = await navigator.permissions.query({name}) if (status.state === 'granted') { await registration.periodicSync.register('refresh', { minInterval: 12 * 60 * 60 * 1000 // 12h }) }

Slide 7

Slide 7 text

Security Consideration

Slide 8

Slide 8 text

#4: 156.74.xxx.xxx #1: 14.102.xxx.xxx #2: 81.177.xxx.xxx #3: 24.152.xxx.xxx Background Sync Tracking also ● crypto mining ● bot net

Slide 9

Slide 9 text

Known Network

Slide 10

Slide 10 text

Permission In Chrome

Slide 11

Slide 11 text

Permission Model Permission Dialog ? User Gesture ? Feature Policy ? Add to Home Screen !!

Slide 12

Slide 12 text

Native App Permission -> Install Web App Permission -> Install

Slide 13

Slide 13 text

Restriction In Chrome

Slide 14

Slide 14 text

● Periodic depends on site-engagement. ● Only fire under known network.

Slide 15

Slide 15 text

Site Engagement

Slide 16

Slide 16 text

Periodic Background Sync enables... ● Installed App via A2HS ● Enough Site-Engagement ● Connected to Known Network ● Android Chrome only

Slide 17

Slide 17 text

Work in progress...

Slide 18

Slide 18 text

No content