Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Speaker Deck
PRO
Sign in
Sign up for free
Periodic Background Sync
Jxck
April 17, 2020
Technology
0
290
Periodic Background Sync
LT about periodic background sync at #remo_study
Jxck
April 17, 2020
Tweet
Share
More Decks by Jxck
See All by Jxck
IE Graduation (IE の功績を讃える)
jxck
20
13k
IE Graduation Certificate
jxck
6
4.9k
RFC 9111: HTTP Caching
jxck
0
160
tc39_study_2
jxck
1
910
IETF における ABNF とプロトコルパーサの話 / ABNF for Protocol Parser @ IETF
jxck
2
570
Web Components 元年 v3 / Web Components first year v3
jxck
1
520
Podcast over PWA
jxck
0
150
Yearly Web 2019
jxck
0
87
webbundle_study
jxck
2
330
Other Decks in Technology
See All in Technology
Persistence in Serverless Applications - ServerlessDays NYC
marcduiker
0
270
Oracle Base Database Service 技術詳細
oracle4engineer
PRO
3
9.2k
OCI Service Mesh 概要 / OCI Service Mesh ovewview
oracle4engineer
PRO
0
110
What's Data Lake ? Azure Data Lake best practice
ryomaru0825
2
760
【Pythonデータ分析勉強会#33】「DearPyGuiに入門しました」の続き~Image-Processing-Node-Editor~
kazuhitotakahashi
0
190
機械学習システムのアーキテクチャとデザインパターン
washizaki
1
690
Security Hub のマルチアカウント 管理・運用をサーバレスでやってみる
ch6noota
0
950
DeepL の用語集が(いつのまにか)日本語に対応してたので試してみた
irokawah0
0
180
Introduction To Technical Writing
olawanle_joel
0
100
RDRA + JavaによるレジャーSaaSプロダクトの要件定義と実装のシームレスな接続
jjebejj
PRO
3
780
Modern Android dependency injection
hugovisser
1
140
わたしを元気づける Botを作ることにした / JAWS-UG 福岡 20220626
eriasano
0
100
Featured
See All Featured
Infographics Made Easy
chrislema
233
17k
Fireside Chat
paigeccino
12
1.3k
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
29
4.3k
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
315
19k
ParisWeb 2013: Learning to Love: Crash Course in Emotional UX Design
dotmariusz
100
5.9k
10 Git Anti Patterns You Should be Aware of
lemiorhan
638
52k
Scaling GitHub
holman
451
140k
How STYLIGHT went responsive
nonsquared
85
3.9k
jQuery: Nuts, Bolts and Bling
dougneiner
56
6.4k
Become a Pro
speakerdeck
PRO
3
850
The Invisible Side of Design
smashingmag
290
48k
What’s in a name? Adding method to the madness
productmarketing
11
1.6k
Transcript
Periodic Background Sync Periodic Background Sync
None
Background Sync self.on('sync', (e) => { // retry failed request
while // offline in background })
Periodic Background Sync self.on('periodic-sync', (e) => { // periodically refresh
contents // up to date in background. })
Use Case - Podcast Feed Update
// 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 }) }
Security Consideration
#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
Known Network
Permission In Chrome
Permission Model Permission Dialog ? User Gesture ? Feature Policy
? Add to Home Screen !!
Native App Permission -> Install Web App Permission -> Install
Restriction In Chrome
• Periodic depends on site-engagement. • Only fire under known
network.
Site Engagement
Periodic Background Sync enables... • Installed App via A2HS •
Enough Site-Engagement • Connected to Known Network • Android Chrome only
Work in progress...
None