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
Web over ServiceWorker
Search
Jxck
February 25, 2017
Technology
7.8k
6
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Web over ServiceWorker
Inside Frontend #1 2017/2/25
Jxck
February 25, 2017
More Decks by Jxck
See All by Jxck
IE Graduation (IE の功績を讃える)
jxck
22
16k
IE Graduation Certificate
jxck
6
6.3k
RFC 9111: HTTP Caching
jxck
1
810
tc39_study_2
jxck
1
14k
IETF における ABNF とプロトコルパーサの話 / ABNF for Protocol Parser @ IETF
jxck
2
1.3k
Web Components 元年 v3 / Web Components first year v3
jxck
1
1.1k
Periodic Background Sync
jxck
0
660
Podcast over PWA
jxck
1
370
Yearly Web 2019
jxck
0
250
Other Decks in Technology
See All in Technology
猫付きpingコマンドを自作
uyuki234
0
260
Agent 時代の Kaggle 展望 / kaggle-in-the-agentic-era
upura
1
810
SmartHR Engineering Team Deck
smarthr
1
2.5k
つくって納得、つかって実感! 大規模言語モデルことはじめ ver2.0
recruitengineers
PRO
5
1.9k
制約理論(ToC)入門 2026版
recruitengineers
PRO
8
2.5k
今こそ聞きたいソフトウェア設計 ドメイン駆動設計再入門
masuda220
PRO
17
7.6k
Digitization部 紹介資料
sansan33
PRO
2
7.7k
なぜ Temporal の大小比較には compare しかないのか / Why Does Temporal Only Have compare() for Comparisons
kazukihayase
1
150
案件に一番詳しいAIを Amazon Bedrock AgentCore で作る ― 知見が知見を生むチームへ / Compounding Knowledge with AgentCore
yusukeshimizu
1
140
Eight Engineering Unit 紹介資料
sansan33
PRO
3
8.2k
Goでデータパイプラインを作ろう
sansantech
PRO
1
500
FDEの心得
noriakioji
5
6.3k
Featured
See All Featured
Lightning talk: Run Django tests with GitHub Actions
sabderemane
0
230
The Cult of Friendly URLs
andyhume
79
7k
Agile Actions for Facilitating Distributed Teams - ADO2019
mkilby
0
250
What does AI have to do with Human Rights?
axbom
PRO
1
2.3k
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
12
1.8k
A Guide to Academic Writing Using Generative AI - A Workshop
ks91
PRO
1
370
Utilizing Notion as your number one productivity tool
mfonobong
4
550
How to optimise 3,500 product descriptions for ecommerce in one day using ChatGPT
katarinadahlin
PRO
2
3.8k
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
254
22k
Building a A Zero-Code AI SEO Workflow
portentint
PRO
0
670
Put a Button on it: Removing Barriers to Going Fast.
kastner
60
4.5k
The SEO identity crisis: Don't let AI make you average
varn
0
530
Transcript
Web over ServiceWorker Inside Frontend #1 2017/2/25 Jxck
• id: Jxck • github: Jxck • twitter: @jxck_ •
blog: https://blog.jxck.io • podcast: http://mozaic.fm • Love: music Jack
Web vs PC App 3
4
5
Web vs Mobile 6
7
8 Capability against • Native/Low API • Installable • Performance
• Permission • Offline • etc
9
10 more...
11
mozaic.fm ep17 12 Service Worker w/ @kinu, @nhiroki_ http://mozaic.fm/post/117004083098/17-service-worker
13 What’s for ?
Service Worker is API for Offline Support 14
Service Worker is Platform for New Capability 15
16 Architecture
17 Proxy as a Service Worker onfetch fetch() response respondWith()
Cache API Browser Cache add()
18 Pusher as a Service Worker onpush
19 TaskManage as a Service Worker onsync onsync !== on-oline/offline
onsync: trigger based on device status network, battery etc onoff/online: toggle of network status
20 Worker as a Service Worker onmessage onmessage
Workers Class Hero I'm free to be whatever I 何になるのも俺の自由だ
Whatever I choose 何を選ぶのも俺の自由だ And I'll hook the request if I want その気になればリクエストだってフックしてやる 21 https://youtu.be/zUADzarhFyA
App Shell 22
23
24 Cache Fetch or Storage
25 Proxy as a Service Worker onfetch fetch() article respondWith()
Cache API Browser Cache get() & merge
Life Cycle 26
27
28 Works even if Page, Tab, Browser doesn’t open (Android)
Tutorials 29 • 中級者向け Service Worker Tutorial • Service Worker
registration/lifecycle
Updates 30
Foreign Fetch 31
Foreign Fetch 32 Link: </worker.js>; rel="serviceworker"
Scope 33 • Scope is single deep match • Single
Controller for Client
Micro Service Workers 34
Install as APK 35
Android APK 36 Build APK then Install
Navigation Preload 37
Navigation Preload 38 fetch Service-Worker-Navigation-Preload: true preloadResponse response
Background Fetch 39
40 Background Fetch Large fetch response UPloading/Downloading Large Media Files
More New Caps 41
42 Capabilities Program Strategy and Goals Q1/Q2 2017 • A2HS
• WebAPKs • Backgournd Fetch • Silent Push • QR Code Scan • Web Share • Origin Trials v2 • 2F-Auth etc
Platform as a ServiceWroker 43
Jack thanks