SlideShare una empresa de Scribd logo
1 de 132
Descargar para leer sin conexión
Maximiliano Firtman
@firt
Uncovering the Secrets of
Progressive Web Apps
Progressive Web Apps
An innovative new way to
create applications for
mobile devices
you write apps that look and
behave exactly like apps on
the phone
Just put them on an internet
server.
Instant distribution.
Easy to update
3years ago
11years ago
19years ago
0years ago
#YearOfPWA
Ideal for all those apps that are just
consuming web content or web
services
State of the Platform
Every Web Browser
🤔
App Support - Mobile OS
iOS 11.3+
Only from store Only from store
Careful with Social Network
Browsing
🤔
App Support - Desktop OS
Only from store
Secrets
Secrets
Installation
Web App Banner
PWA Criteria
Engagement?
Installation
Add or Install?
Badging
Installation
Installation
Installation
Installation
Installation
Installation
Installation
Installation
Installation
Installation
Installation
Installation
Badging 🤨
Install Custom Action
Install Custom Action


let installPrompt;
window.addEventListener("beforeinstallprompt", e => {
//TODO: enable Install button
e.preventDefault();
installPrompt = e;
});
JavaScript
Install Custom Action


let installPrompt;
window.addEventListener("beforeinstallprompt", e => {
//TODO: enable Install button
e.preventDefault();
installPrompt = e;
});
JavaScript
Install Custom Action


let installPrompt;
window.addEventListener("beforeinstallprompt", e => {
//TODO: enable Install button
e.preventDefault();
installPrompt = e;
});
JavaScript
Install Custom Action


let installPrompt;
window.addEventListener("beforeinstallprompt", e => {
//TODO: enable Install button
e.preventDefault();
installPrompt = e;
});
JavaScript
Install Custom Action


buttonInstall.addEventListener("click", e => {
installPrompt.prompt();
});
JavaScript
Secrets
Dev Tools
Testing and Debugging
iOS Simulator
iOS Simulator
Android Emulator
Android Emulator
Android Emulator
Localhost on Android
Localhost on Android
Localhost on Android
Localhost on Android
Localhost on Android
Chromebook Emulator
Chromebook Emulator
https://developer.android.com/topic/arc/emulator
Chromebook Emulator
Secrets
LifeCycle & Storage
Persistent Storage API


if (navigator.storage && navigator.storage.persist) {
navigator.storage.persist();
}
JavaScript
PWA LifeCycle
First Visit Browser Loading
PWA LifeCycle
First Visit
SW Installation ⚡install
⚡activate
Browser Loading
PWA LifeCycle
First Visit
SW Installation
User installs PWA
⚡install
⚡activate
Browser Loading
⚡appinstalled
PWA LifeCycle
Second visit App Loading
❓display-mode
❓start_url
PWA LifeCycle
Second visit
App goes background
App Loading
⚡visibilitychange
❓display-mode
❓start_url
PWA LifeCycle
Second visit
App goes background
App is terminated on iOS
App Loading
⚡visibilitychange
❓display-mode
❓start_url
😣
PWA LifeCycle
Second visit
App goes background
App might be suspended
App Loading
⚡visibilitychange
❓display-mode
❓start_url
⚡freeze 🆕
PWA LifeCycle
Second visit
App goes background
App will be suspended
App Loading
⚡visibilitychange
❓display-mode
❓start_url
⚡freeze 🆕
User goes back to App ⚡resume 🆕
⚡visibilitychange
App in memory
PWA LifeCycle
Second visit
App goes background
App will be suspended
App Loading
⚡visibilitychange
❓display-mode
❓start_url
⚡freeze 🆕
User goes back to App ❓document.wasDiscarded 🆕
⚡load
App was discarded
Secrets
User Interface
Pull to Refresh
Pull to Refresh
body {
  /* Disables pull-to-refresh */
  overscroll-behavior-y: contain;
}
CSS
Avoid App Translation
Avoid App Translation
<meta name="google" content="notranslate">
HTML
Avoid App Translation


if (matchMedia('(display-mode: standalone)').matches) {

document.querySelector("head").innerHTML +=
'<meta name="google" content="notranslate">';


}
JavaScript
Secrets
Fighting Challenges
WebAPK
Link Capturing (Intents)
Careful with Link Capturing
Use environment margins


body {
margin-top: env(safe-area-inset-top);
margin-left: env(safe-area-inset-left);
margin-bottom: env(safe-area-inset-bottom);
margin-right: env(safe-area-inset-right);
}
CSS


<meta name="viewport" content="..., viewport-fit: cover" />
HTML
Save state
Use Page Visibility API
Restore state
Use Cache Storage
Standalone PWASafari
Web Storage
IndexedDB
Cookies
Web Storage
IndexedDB
Cookies
Use Cache Storage
Standalone PWASafari
Web Storage
IndexedDB
Cookies
Web Storage
IndexedDB
Cookies
Cache Storage
Launch Images
Launch Images


<link rel="apple-touch-startup-image" 

src="image-screen-size.png">
<link rel="apple-touch-startup-image" 

src="launch-iphonex.png"
sizes="1125x2436">
HTML
Launch Images
Launch Images
Launch Images
Launch Images
Remove support for iOS
Remove support for iOS
Secrets
App Stores
App Store
App Store
WebView and LOT of native code
App Store
Trusted Web Activities
coming on Chrome 69 later this year
App Store
APK
Icons


PWA Certified
URL
TWA
Standalone mode
Store Distribution
Microsoft Store
kaiOS store coming
Play Store coming with TWA
App Store?
PWAs are great
Let’s use a critical eye
Remember our Goals
Goals
A good,
Goals
accessible,
Goals
and performant
Goals
User Experience
uee>
<blink>@firt - firt.mobi</blink>

Más contenido relacionado

La actualidad más candente

Phone gap
Phone gapPhone gap
Phone gap
caviare
 
Campaign Metrics - Measure Camp 2013
Campaign Metrics - Measure Camp 2013Campaign Metrics - Measure Camp 2013
Campaign Metrics - Measure Camp 2013
Steve Lock
 

La actualidad más candente (20)

Promotee
PromoteePromotee
Promotee
 
How google search work
How google search workHow google search work
How google search work
 
Build Facebook Connect enabled applications with Google Apps Engine
Build Facebook Connect enabled applications with Google Apps EngineBuild Facebook Connect enabled applications with Google Apps Engine
Build Facebook Connect enabled applications with Google Apps Engine
 
The IPad effect
The IPad effectThe IPad effect
The IPad effect
 
Webmaker Workshop: Appmaker in 60mins
Webmaker Workshop: Appmaker in 60minsWebmaker Workshop: Appmaker in 60mins
Webmaker Workshop: Appmaker in 60mins
 
Taking the P out of PWA
Taking the P out of PWATaking the P out of PWA
Taking the P out of PWA
 
Apps for iPads
Apps for iPadsApps for iPads
Apps for iPads
 
FOWA2013: The rise of single page applications
FOWA2013: The rise of single page applicationsFOWA2013: The rise of single page applications
FOWA2013: The rise of single page applications
 
Create a Profitable News App using Ionic 4 and Angular
Create a Profitable News App using Ionic 4 and Angular								Create a Profitable News App using Ionic 4 and Angular
Create a Profitable News App using Ionic 4 and Angular
 
Akshita
AkshitaAkshita
Akshita
 
V3 importexport
V3 importexportV3 importexport
V3 importexport
 
Black hat seo
Black hat seoBlack hat seo
Black hat seo
 
Ionic: The Web SDK for Develop Mobile Apps.
Ionic: The Web SDK for Develop Mobile Apps.Ionic: The Web SDK for Develop Mobile Apps.
Ionic: The Web SDK for Develop Mobile Apps.
 
Building Progressive Web Apps (Kyle Buchanan)
Building Progressive Web Apps (Kyle Buchanan)Building Progressive Web Apps (Kyle Buchanan)
Building Progressive Web Apps (Kyle Buchanan)
 
The Answer is Evernote
The Answer is EvernoteThe Answer is Evernote
The Answer is Evernote
 
Phone gap
Phone gapPhone gap
Phone gap
 
How to create a Web API no one wants to use
How to create a Web API no one wants to use How to create a Web API no one wants to use
How to create a Web API no one wants to use
 
Campaign Metrics - Measure Camp 2013
Campaign Metrics - Measure Camp 2013Campaign Metrics - Measure Camp 2013
Campaign Metrics - Measure Camp 2013
 
Ionic2 the the journey continues ng-sydney 02-03-16 and ionicaustralia 23-0...
Ionic2   the the journey continues ng-sydney 02-03-16 and ionicaustralia 23-0...Ionic2   the the journey continues ng-sydney 02-03-16 and ionicaustralia 23-0...
Ionic2 the the journey continues ng-sydney 02-03-16 and ionicaustralia 23-0...
 
Maven
MavenMaven
Maven
 

Similar a Uncovering Secrets of Progressive Web Apps

Similar a Uncovering Secrets of Progressive Web Apps (20)

The modern PWA Cheat Sheet
The modern PWA Cheat SheetThe modern PWA Cheat Sheet
The modern PWA Cheat Sheet
 
The web - What it has, what it lacks and where it must go - keynote at Riga D...
The web - What it has, what it lacks and where it must go - keynote at Riga D...The web - What it has, what it lacks and where it must go - keynote at Riga D...
The web - What it has, what it lacks and where it must go - keynote at Riga D...
 
Deep Link (to the Future)
Deep Link (to the Future)Deep Link (to the Future)
Deep Link (to the Future)
 
[@NaukriEngineering] Deferred deep linking in iOS
[@NaukriEngineering] Deferred deep linking in iOS[@NaukriEngineering] Deferred deep linking in iOS
[@NaukriEngineering] Deferred deep linking in iOS
 
The web - What it has, what it lacks and where it must go - Bulgaria Web Summ...
The web - What it has, what it lacks and where it must go - Bulgaria Web Summ...The web - What it has, what it lacks and where it must go - Bulgaria Web Summ...
The web - What it has, what it lacks and where it must go - Bulgaria Web Summ...
 
The Future of Web Apps
The Future of Web AppsThe Future of Web Apps
The Future of Web Apps
 
Progressive Web App Challenges
Progressive Web App ChallengesProgressive Web App Challenges
Progressive Web App Challenges
 
Building WebApp with HTML5
Building WebApp with HTML5Building WebApp with HTML5
Building WebApp with HTML5
 
Intro to Mobile Development for Web iOS and Android
Intro to Mobile Development for Web iOS and AndroidIntro to Mobile Development for Web iOS and Android
Intro to Mobile Development for Web iOS and Android
 
Orangescrum Mobile API Add on User Manual
Orangescrum Mobile API Add on User ManualOrangescrum Mobile API Add on User Manual
Orangescrum Mobile API Add on User Manual
 
Progressivewebapps by sheddy nathan for isdev2017
Progressivewebapps by sheddy nathan for isdev2017Progressivewebapps by sheddy nathan for isdev2017
Progressivewebapps by sheddy nathan for isdev2017
 
Indexing on Fire: Google Firebase Native & Web App Indexing - MozCon 2016
Indexing on Fire: Google Firebase Native & Web App Indexing - MozCon 2016Indexing on Fire: Google Firebase Native & Web App Indexing - MozCon 2016
Indexing on Fire: Google Firebase Native & Web App Indexing - MozCon 2016
 
The web - What it has, what it lacks and where it must go - Istanbul
The web - What it has, what it lacks and where it must go - IstanbulThe web - What it has, what it lacks and where it must go - Istanbul
The web - What it has, what it lacks and where it must go - Istanbul
 
Business Values of PWAs
Business Values of PWAsBusiness Values of PWAs
Business Values of PWAs
 
Jws masterclass progressive web apps
Jws masterclass progressive web appsJws masterclass progressive web apps
Jws masterclass progressive web apps
 
HireVietnamese - Lesson 1
HireVietnamese - Lesson 1HireVietnamese - Lesson 1
HireVietnamese - Lesson 1
 
Lesson 1
Lesson 1Lesson 1
Lesson 1
 
HireVietnamese - Lesson 1
HireVietnamese - Lesson 1HireVietnamese - Lesson 1
HireVietnamese - Lesson 1
 
How NOT to Suck at App Distribution - Quick Start Guide - Appsocially's Growt...
How NOT to Suck at App Distribution - Quick Start Guide - Appsocially's Growt...How NOT to Suck at App Distribution - Quick Start Guide - Appsocially's Growt...
How NOT to Suck at App Distribution - Quick Start Guide - Appsocially's Growt...
 
Uncovering breaking changes behind UI on mobile applications
Uncovering breaking changes behind UI on mobile applicationsUncovering breaking changes behind UI on mobile applications
Uncovering breaking changes behind UI on mobile applications
 

Más de Maximiliano Firtman

Modeveast Keynote: "Mobile. Change is the only constant"
Modeveast Keynote: "Mobile. Change is the only constant"Modeveast Keynote: "Mobile. Change is the only constant"
Modeveast Keynote: "Mobile. Change is the only constant"
Maximiliano Firtman
 

Más de Maximiliano Firtman (20)

ChatGPT and AI for Web Developers
ChatGPT and AI for Web DevelopersChatGPT and AI for Web Developers
ChatGPT and AI for Web Developers
 
PWA Cheat Sheet 2023
PWA Cheat Sheet 2023PWA Cheat Sheet 2023
PWA Cheat Sheet 2023
 
Hacking Web Performance en Español - JSConf México 2020
Hacking Web Performance en Español - JSConf México 2020Hacking Web Performance en Español - JSConf México 2020
Hacking Web Performance en Español - JSConf México 2020
 
Hacking Web Performance 2019
Hacking Web Performance 2019Hacking Web Performance 2019
Hacking Web Performance 2019
 
Progressive Web Apps Keynote
Progressive Web Apps KeynoteProgressive Web Apps Keynote
Progressive Web Apps Keynote
 
Hacking Web Performance
Hacking Web PerformanceHacking Web Performance
Hacking Web Performance
 
Hacking Web Performance
Hacking Web Performance Hacking Web Performance
Hacking Web Performance
 
Hacking Web Performance @ ForwardJS 2017
Hacking Web Performance @ ForwardJS 2017Hacking Web Performance @ ForwardJS 2017
Hacking Web Performance @ ForwardJS 2017
 
La Web Salta al Mundo Físico - Web meets Physical World (spanish)
La Web Salta al Mundo Físico - Web meets Physical World (spanish)La Web Salta al Mundo Físico - Web meets Physical World (spanish)
La Web Salta al Mundo Físico - Web meets Physical World (spanish)
 
Progressive Web Apps (español - spanish)
Progressive Web Apps (español - spanish)Progressive Web Apps (español - spanish)
Progressive Web Apps (español - spanish)
 
High Performance Web - Full Stack Toronto
High Performance Web - Full Stack TorontoHigh Performance Web - Full Stack Toronto
High Performance Web - Full Stack Toronto
 
Responsive Images and Performance
Responsive Images and PerformanceResponsive Images and Performance
Responsive Images and Performance
 
The Physical World meets the Web
The Physical World meets the WebThe Physical World meets the Web
The Physical World meets the Web
 
Extreme Web Performance for Mobile Devices
Extreme Web Performance for Mobile Devices Extreme Web Performance for Mobile Devices
Extreme Web Performance for Mobile Devices
 
Extreme Web Performance for Mobile Device Fluent 2015
Extreme Web Performance for Mobile Device Fluent 2015Extreme Web Performance for Mobile Device Fluent 2015
Extreme Web Performance for Mobile Device Fluent 2015
 
Extreme Web Performance for Mobile Devices - Velocity Barcelona 2014
Extreme Web Performance for Mobile Devices - Velocity Barcelona 2014Extreme Web Performance for Mobile Devices - Velocity Barcelona 2014
Extreme Web Performance for Mobile Devices - Velocity Barcelona 2014
 
Extreme Web Performance for Mobile Devices - Velocity NY
Extreme Web Performance for Mobile Devices - Velocity NYExtreme Web Performance for Mobile Devices - Velocity NY
Extreme Web Performance for Mobile Devices - Velocity NY
 
Extreme Web Performance for Mobile Devices
Extreme Web Performance for Mobile DevicesExtreme Web Performance for Mobile Devices
Extreme Web Performance for Mobile Devices
 
Modeveast Keynote: "Mobile. Change is the only constant"
Modeveast Keynote: "Mobile. Change is the only constant"Modeveast Keynote: "Mobile. Change is the only constant"
Modeveast Keynote: "Mobile. Change is the only constant"
 
FINHTML5 - Breaking the mobile web
FINHTML5 - Breaking the mobile webFINHTML5 - Breaking the mobile web
FINHTML5 - Breaking the mobile web
 

Último

Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
WSO2
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Victor Rentea
 

Último (20)

TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Spring Boot vs Quarkus the ultimate battle - DevoxxUK
Spring Boot vs Quarkus the ultimate battle - DevoxxUKSpring Boot vs Quarkus the ultimate battle - DevoxxUK
Spring Boot vs Quarkus the ultimate battle - DevoxxUK
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with Milvus
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
 
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 

Uncovering Secrets of Progressive Web Apps