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
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
Felipe Sousa
December 15, 2017
Programming
720
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
390
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
450
Other Decks in Programming
See All in Programming
技術記事、AIに書かせるか、自分で書くか? 〜それでも私が自分の手で書く理由〜 / #QiitaConference
jnchito
2
1.4k
そのテスト、説明できますか?~LWテスト戦略FW~のご紹介
nakahara
0
130
「エンジニアインターン、どうやって取った?」準備のリアルを語るLT会 Progate BAR
akiomatic
0
130
AI 時代のソフトウェア設計の学び方
masuda220
PRO
29
12k
Vite+ Unified Toolchain for the Web
naokihaba
0
310
Developing with AI Agents — Codex, Claude Code & Cowork Practical Guide
x5gtrn
PRO
0
1.3k
Spec Driven Development | AI Summit Lisbon
danielsogl
PRO
0
190
気づいたらRubyで100作品 ー クリエイティブコーディングが生活の一部になるまで / 100 Ruby Sketches Later: How Creative Coding Became Part of My Life
chobishiba
3
580
TypeScript+Orvalで実現する型安全かつ堅牢でスケーラブルなマルチチャネル通知基盤 / TSKaigi Night talks ~after conference~
d0riven
0
340
Signal Forms: Details & Live Coding @enterJS 2026 in Mannheim
manfredsteyer
PRO
0
140
OSもどきOS
arkw
0
570
Creating Composable Callables in Contemporary C++
rollbear
0
130
Featured
See All Featured
Large-scale JavaScript Application Architecture
addyosmani
515
110k
Marketing Yourself as an Engineer | Alaka | Gurzu
gurzu
0
240
How Software Deployment tools have changed in the past 20 years
geshan
0
34k
Why Your Marketing Sucks and What You Can Do About It - Sophie Logan
marketingsoph
0
170
Ecommerce SEO: The Keys for Success Now & Beyond - #SERPConf2024
aleyda
1
2k
Data-driven link building: lessons from a $708K investment (BrightonSEO talk)
szymonslowik
1
1.1k
Designing Powerful Visuals for Engaging Learning
tmiket
1
410
Done Done
chrislema
186
16k
Neural Spatial Audio Processing for Sound Field Analysis and Control
skoyamalab
0
330
AI in Enterprises - Java and Open Source to the Rescue
ivargrimstad
0
1.3k
Money Talks: Using Revenue to Get Sh*t Done
nikkihalliwell
0
250
Docker and Python
trallard
47
3.9k
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