Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Periodic Background Sync
Search
Jxck
April 17, 2020
Technology
0
430
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
21
15k
IE Graduation Certificate
jxck
6
5.7k
RFC 9111: HTTP Caching
jxck
0
500
tc39_study_2
jxck
1
1.2k
IETF における ABNF とプロトコルパーサの話 / ABNF for Protocol Parser @ IETF
jxck
2
840
Web Components 元年 v3 / Web Components first year v3
jxck
1
810
Podcast over PWA
jxck
0
190
Yearly Web 2019
jxck
0
130
webbundle_study
jxck
2
480
Other Decks in Technology
See All in Technology
どう買う?Azure
kuniteru
1
190
オブジェクト指向CSSが叶えたかったことと、CSSのいま / The aims of Object-oriented CSS and the current state of CSS usage
shinkufencer
11
3.2k
任意コード実行の原理
ffri
0
170
8週連続ウェビナー_イチから学ぶFivetran
cmsuzu
0
160
技術広報経験0のEMがエンジニアブランディングをはじめてみた
coconala_engineer
1
130
大規模なアジャイル開発の現場と技術負債 / Technical Debt
yoshiitaka
20
4k
あらゆる商品を扱う商品データベースを再設計した話 / product db re-architecture
rince
8
3.4k
AWS アーキテクチャクイズ
yuu26
2
700
Oracle Database で機械学習を始めよう! Oracle Machine Learning
oracle4engineer
PRO
1
140
実務への応用例から考える 変更に強いオブジェクト指向設計 / 20240324-ooc2024
bengo4com
7
4.6k
Getting started with controlling LEGO using Swift
hcrane
0
120
エバンジェリスト活動を7年やってきて見えてきた、コミュニティとエバンジェリストの関係
soracom
PRO
1
200
Featured
See All Featured
In The Pink: A Labor of Love
frogandcode
137
21k
Adopting Sorbet at Scale
ufuk
66
8.5k
Building a Scalable Design System with Sketch
lauravandoore
455
32k
ParisWeb 2013: Learning to Love: Crash Course in Emotional UX Design
dotmariusz
101
6.6k
The Brand Is Dead. Long Live the Brand.
mthomps
48
21k
Git: the NoSQL Database
bkeepers
PRO
421
63k
What’s in a name? Adding method to the madness
productmarketing
PRO
14
2.6k
How to name files
jennybc
62
92k
It's Worth the Effort
3n
180
27k
Producing Creativity
orderedlist
PRO
335
39k
The Art of Programming - Codeland 2020
erikaheidi
40
12k
The Cost Of JavaScript in 2023
addyosmani
13
3.7k
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