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
Progressive Web Apps Done Right
Search
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
Felipe Sousa
December 15, 2017
Programming
730
1
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Progressive Web Apps Done Right
Felipe Sousa
December 15, 2017
More Decks by Felipe Sousa
See All by Felipe Sousa
DevFest Santiago 2019 - Progressive Web Apps Done Right
felipesousa
0
400
Shared web-components with StencilJS
felipesousa
0
640
Criando aplicações componentizadas com Polymer
felipesousa
0
400
Criando aplicações componentizadas com Polymer - C4P CEJS 2017
felipesousa
1
270
Criando Aplicações Componentizadas com Polymer
felipesousa
0
140
Uma introdução a Angular 2
felipesousa
2
460
Other Decks in Programming
See All in Programming
鹿野さんに聞く!『TypeScriptコードレシピ集』で磨く実践力
tonkotsuboy_com
4
1k
Observability in Practice:Grafana 與 Edge Device SRE 的那些事
blueswen
0
190
なぜ関数型プログラミングで「型」と「証明」が語られるのか #fp_matsuri
kajitack
3
720
1B+ /day規模のログを管理する技術
broadleaf
0
130
Vue × Nuxt × Oxc どこまで使える?実運用の現在地
andpad
0
360
Skillsは効率化、Agentsは"自分の拡張"——Builder時代のエージェント編成(CC Night 2026)
wemra
1
200
なぜ型を書くのか? TSKaigi2026で改めて考える #tskaigi_smarthr
kajitack
0
300
Semantic Version 単位で戦略を柔軟に変えて、パッケージアップデートを自動化する
daitasu
1
350
エンジニアと一緒にテストコードの設計と実装を改善した話
mototakatsu
0
260
Performance Engineering for Everyone
elenatanasoiu
0
260
Snowflake Summitでの新機能 CoCo / CoWork / snowflake-summit-2026-overall-what-new-coco
tatsuhiro
1
220
ADKを使って簡単にAIエージェントを作ってみよう
k1mu21
0
290
Featured
See All Featured
AI in Enterprises - Java and Open Source to the Rescue
ivargrimstad
0
1.4k
The Art of Delivering Value - GDevCon NA Keynote
reverentgeek
16
2k
HTML-Aware ERB: The Path to Reactive Rendering @ RubyCon 2026, Rimini, Italy
marcoroth
2
320
StorybookのUI Testing Handbookを読んだ
zakiyama
31
6.8k
Marketing Yourself as an Engineer | Alaka | Gurzu
gurzu
0
260
jQuery: Nuts, Bolts and Bling
dougneiner
66
8.5k
brightonSEO & MeasureFest 2025 - Christian Goodrich - Winning strategies for Black Friday CRO & PPC
cargoodrich
3
750
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
55
3.4k
The SEO Collaboration Effect
kristinabergwall1
1
500
Impact Scores and Hybrid Strategies: The future of link building
tamaranovitovic
0
330
What the history of the web can teach us about the future of AI
inesmontani
PRO
1
630
No one is an island. Learnings from fostering a developers community.
thoeni
21
3.8k
Transcript
None
felipe sousa front end developer gdg fortaleza organizer
progressive web apps @felipz_sousa done right.
progressive web apps done right. @felipz_sousa
None
None
None
None
None
* responsivity
* mobile first * responsivity
* mobile first * mobile friendly * responsivity
why experience is important?!
None
is ugly
isn’t intuitive is ugly
Experience
progressive web apps
Fast Engaging Reliable *
Fast 1.
Load instantly even in uncertain network conditions.
None
Reliable 2.
Respond quickly to user interactions with silky smooth animations and
no slow scrolling.
Engaging 3.
Feel like a natural app on the device, with an
immersive user experience.
•Instalable
•Icons/Splashscreen •Instalable
•Icons/Splashscreen •Instalable •Lightweight
•Icons/Splashscreen •Instalable •Push Notifications •Lightweight
None
None
None
None
None
PROGRESSIVE WEB APPS IS ABOUT PROVIDE A BETTER EXPERIENCE TO
YOUR USER.
Engaging Reliable Fast
Web Manifest Engaging Reliable Fast Service Worker
Service Workers
offline
Application Cache
None
<html manifest="example.appcache"> ... </html>
CACHE MANIFEST # files index.html cache.html style.css image1.png # Use
from network if available NETWORK: network.html # Fallback content FALLBACK: fallback.html
A service worker is a script that your browser runs
in the background, separate from the web page, enabling features that do not require a web page or user interaction.
* HTTPS is a requirement.
None
None
Background Sync / Push API
•Install •Register •Cache Control/Strategies •Update Cache •Listen Fetch Events
if ('serviceWorker' in navigator) { window.addEventListener('load', function() { navigator.serviceWorker.register(‘/sw.js') .then(function(registration)
{}) .catch(function(err) {}); }); }
var CACHE_NAME = ‘CACHE_NAME_1’; var urlsToCache = [ '/', ‘/style.css’,
‘/script.js’, ‘/imagem.png' ]; self.addEventListener('install', function(event) { event.waitUntil( caches.open(CACHE_NAME) .then(function(cache) { return cache.addAll(urlsToCache); }) ); });
None
None
None
None
event: fetch
self.addEventListener('fetch', function (event) { event.respondWith( caches.match(event.request) .then(response => { if(response)
return response; return fetch(event.request); }) ) });
var CACHE_NAME = ‘CACHE_NAME_1’; var urlsToCache = [ '/', ‘/style.css’,
‘/script.js’, ‘/imagem.png' ]; self.addEventListener('install', function(event) { event.waitUntil( caches.open(CACHE_NAME) .then(function(cache) { return cache.addAll(urlsToCache); }) ); }); self.addEventListener('fetch', function (event) { event.respondWith( caches.match(event.request) .then(function(response) => { if(response) return response; return fetch(event.request); }) ) });
None
None
None
Caching strategies
•Cache and Update •Cache Only •Cache, update and refresh •Embedded
fallback •Network or cache
None
•Cache and Update •Cache Only •Cache, update and refresh •Embedded
fallback •Network or cache
self.addEventListener('fetch', function(evt) { evt.respondWith(fromCache(evt.request)); evt.waitUntil( update(evt.request) .then(refresh) ); }); function
refresh(response) { return self.clients.matchAll().then(function (clients) { clients.forEach(function (client) { var message = { type: 'refresh', url: response.url, eTag: response.headers.get('ETag') }; client.postMessage(JSON.stringify(message)); }); }); }
Web Manifest
index.html <meta name="apple−mobile−web−app−capable" content="yes"> <meta name="apple−mobile−web−app−title" content="Name App"> <link rel="apple−touch−icon−precomposed"
href="path/name.png">
The web application manifest is a JSON file that lets
you control how the web application or website is displayed to the user in areas that are typically expected to see native applications.
None
None
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF−8"> <title>My Page</title> <!−−
manifest −−> <link rel="manifest" src="/manifest.json"> </head> <body> </body> </html>
{ "short_name": “Application Name”, "name": “Application Full Name", "icons": [
{ "src": "launcher−icon−4x.png", "sizes": "192x192", "type": "image/png" } ], "start_url": "/index.html", "display": “standalone", "theme_color": "#77D48A", "background_color": "#E4B0AC" }
{ "short_name": “Application Name”, "name": “Application Full Name", "icons": [
{ "src": "launcher−icon−4x.png", "sizes": "192x192", "type": "image/png" } ], "start_url": "/index.html", "display": “standalone", "theme_color": "#77D48A", "background_color": "#E4B0AC" }
{ "short_name": “Application Name”, "name": “Application Full Name", "icons": [
{ "src": "launcher−icon−4x.png", "sizes": "192x192", "type": "image/png" } ], "start_url": "/index.html", "display": “standalone", "theme_color": "#77D48A", "background_color": "#E4B0AC" }
{ "short_name": “Application Name”, "name": “Application Full Name", "icons": [
{ "src": "launcher−icon−4x.png", "sizes": "192x192", "type": "image/png" } ], "start_url": “/index.html?app=true”, "display": “standalone", "theme_color": "#77D48A", "background_color": "#E4B0AC" }
{ "short_name": “Application Name”, "name": “Application Full Name", "icons": [
{ "src": "launcher−icon−4x.png", "sizes": "192x192", "type": "image/png" } ], "start_url": “/index.html?app=true”, "display": “standalone", "theme_color": "#77D48A", "background_color": "#E4B0AC" }
{ "short_name": “Application Name”, "name": “Application Full Name", "icons": [
{ "src": "launcher−icon−4x.png", "sizes": "192x192", "type": "image/png" } ], "start_url": “/index.html?app=true”, "display": “standalone", "theme_color": "#77D48A", "background_color": "#E4B0AC" }
None
None
None
None
• Have a registered worker service on your site. •
Have a manifest file with the basics configurations. • Be displayed by HTTPS. • Be visited at least twice, with at least five minutes between visits. Banner - Add to Home Screen
None
None
Fast Engaging Reliable *
Fast Engaging Reliable *
•Accessibility •Performance •HTML Semantic •Responsivity •Push Notifications
None
None
None
None
None
None
None
None
Progressive Web Apps are extensible!
None
None
None
/felipesousa
@felipz_sousa /felipesousa
@felipz_sousa /felipesousa felipesousa.me
thank’s! @felipz_sousa /felipesousa felipesousa.me