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
How not to mess up your first PWA
Search
Dmitri Pisarev
June 18, 2020
Programming
64
0
Share
How not to mess up your first PWA
Dmitri Pisarev
June 18, 2020
More Decks by Dmitri Pisarev
See All by Dmitri Pisarev
React State Management
dimaip
0
140
Closing the Gap - For all who are tired of choosing between Apps and Websites
dimaip
0
52
Docker 101 - From Development to Production and back
dimaip
0
140
Your CSS Code Needs an Architect
dimaip
0
46
Other Decks in Programming
See All in Programming
ふにゃっとしない名前の付け方 〜哲学で茹で上げる、コシのあるソフトウェア設計〜
shimomura
0
120
How We Practice Exploratory Testing in Iterative Development( #scrumniigata ) / 反復開発の中で、探索的テストをどう実施しているか
teyamagu
PRO
3
840
書籍「ユーザーストーリーマッピング」が私のバイブル
asumikam
4
490
サーバーレスで作る、動画データ管理基盤
oyasumipants
0
200
ハーネスエンジニアリングにどう向き合うか 〜ルールファイルを超えて開発プロセスを設計する〜 / How to approach harness engineering
rkaga
28
23k
Lightning-Fast Method Calls with Ruby 4.1 ZJIT / RubyKaigi 2026
k0kubun
3
3.1k
ソフトウェア設計の結合バランス #phperkaigi
kajitack
0
510
クラウドネイティブなエンジニアに向ける Raycastの魅力と実際の活用事例
nealle
2
260
実践ハーネスエンジニアリング:ステアリングループを実例から読み解く / Practical Harness Engineering: Understanding Steering Loops Through Real-World Examples
nrslib
5
5.5k
Augmenting AI with the Power of Jakarta EE
ivargrimstad
0
470
「なんか〇〇ライブラリで脆弱性あるみたいなんだけど。。。」から始める脆弱性対応 / First Steps in Vulnerability Response
mackey0225
2
130
Sans tests, vos agents ne sont pas fiables
nabondance
0
130
Featured
See All Featured
SEO in 2025: How to Prepare for the Future of Search
ipullrank
3
3.4k
Gemini Prompt Engineering: Practical Techniques for Tangible AI Outcomes
mfonobong
2
390
Making the Leap to Tech Lead
cromwellryan
135
9.8k
Digital Ethics as a Driver of Design Innovation
axbom
PRO
1
290
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
31
3.2k
Primal Persuasion: How to Engage the Brain for Learning That Lasts
tmiket
0
340
Leveraging LLMs for student feedback in introductory data science courses - posit::conf(2025)
minecr
1
250
Information Architects: The Missing Link in Design Systems
soysaucechin
0
920
Producing Creativity
orderedlist
PRO
348
40k
Impact Scores and Hybrid Strategies: The future of link building
tamaranovitovic
0
270
Getting science done with accelerated Python computing platforms
jacobtomlinson
2
200
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
46
2.8k
Transcript
Dmitri Pisarev, Neos Conference 2020 How not to Mess up
Your First PWA Wish I knew this stuff earlier…
- Christian believer ❤ - Into web dev since 2005
- Volunteer @ SFI.ru - Part-time @ DEED - team member Dmitri Pisarev Me, COVID-19 edition @dimaip dimaip.github.io
https://c.psmb.ru
None
http://dimaip.github.io/2015/11/15/react-neos/ https://github.com/bwaidelich/Wwwision.Neos.GraphQL
Some research
None
None
None
Why Native Apps are so engaging? + offline, performance, reliability
+ push notifications + home screen icon, OS integration + hardware access
Native Apps + Web React Native Flutter, Xamarin Cordova/Capacitor -
3x effort - Web is an afterthought - Yoga !== CSS - No JS no Love - WebView << Safari/Chrome - App Store review?! Options?
How about PWAs?
What are PWAs? + Offline (ServiceWorker) + push notifications (WebPush)
+ home screen icon (manifest.json) + other cool web APIs
Useful Web APIs + WebShare + WebAuthn + RequestPayment +
WebRTC + WebPush
iOS + SW support since iOS 11.3 - No App
Store - No push notifications - No install prompt - No SW in WKWebView Support Android + PWA paradise! + Submit to Play Market as Trusted Web Activity
Mobile Integration
Desktop Integration
https://love2dev.com/pwa/
Let’s write some code!
Challenge 1. ServiceWorkers are rocket science
manifest.json index.html
Let’s go offline some.js sw.js
We are stuck! - Reload? - Restart device? - Delete
service worker? - Replace with empty service worker? ⏳ - HTTP header Clear-Site-Data: "*"
Caching Strategies - Stale-While-Revalidate - Cache First (Cache Falling Back
to Network) - Network First (Network Falling Back to Cache) - Network Only Hand-rolling is hard and dangerous!
Workbox to mask some complexity Warning! Workbox is a leaky
abstraction! sw.js
Challenge 2. Getting PWA to self-update
Service Worker Lifecycle
sw.js
https://redfin.engineering/service-workers-break-the-browsers-refresh-button-by-default-here-s-why-56f9417694 Must read:
Don’t wait for reload …on iOS 12 it may not
happen soon
Challenge 3. Deploying an app with code-splitting
Deploying an app with code-splitting
Solution 1. Keep previous versions of assets PROS: the most
reliable solution CONS: not many platforms support it out of the box
Solution 2. Catch exceptions and force-reload SW PROS: works with
all deployment platforms CONS: horrible UX for stateful apps
Solution 3. Pre-cache all JS bundles with a service worker
PROS: prefetching makes sense in many cases anyways CONS: does not conserve bandwidth
Make it look native
Viewport, Icons, loading screen
CSS to disable some browser effects Use with caution and
keep a11y in mind!
Meet platform expectations!
Ionic Components
Dark Mode
Useful tools
None
pwabuilder.com
None
1. Choose the right platform 2. Make sure you understand
Service Workers well 3. Pretend to be native Too long; Didn’t listen
It’s open source! ❤ github.com/dimaip/calendar
@dimaip dimaip.github.io dev.to/dimaip Say Hi!