Progressive Web Apps
State of the Union
Dominick Ng
TL, Web Apps Platform
@dominickng
Agenda
A brief history of PWAs
Web for content, not creation
Web | Native |
Runs on any device | Platform-specific |
Reading / watching / buying | Creative / working / gaming |
Tabbed browser | Standalone window |
Works online | Works offline |
Search + navigate | Search + download + install |
Demand for building apps on web tech
Mobile saw users flock to apps
PWAs: the best of both worlds
PWA ingredients - Web app manifest
{
"name": "Squoosh",
"start_url": "/",
"scope": "/",
"display": "standalone",
"background_color": "#fff",
"theme_color": "#f78f21",
"icons": [ ... ]
}
PWA ingredients - Web app manifest
{
"name": "Squoosh",
"start_url": "/",
"scope": "/",
"display": "standalone",
"background_color": "#fff",
"theme_color": "#f78f21",
"icons": [ ... ]
}
PWA ingredients - Web app manifest
{
"name": "Squoosh",
"start_url": "/",
"scope": "/",
"display": "standalone",
"background_color": "#fff",
"theme_color": "#f78f21",
"icons": [ ... ]
}
PWA ingredients - Web app manifest
{
"name": "Squoosh",
"start_url": "/",
"scope": "/",
"display": "standalone",
"background_color": "#fff",
"theme_color": "#f78f21",
"icons": [ ... ]
}
PWA ingredients - Service Worker
// main.js
if 'serviceWorker' in navigator {
navigator.serviceWorker.register(
'/service-worker.js', { scope: '/'});
}
PWA ingredients - Service Worker
// service-worker.js
self.addEventListener('install', function(event) {
event.waitUntil(
caches.open('cache-v1')
.then(function(cache) {
return cache.addAll(['/offline.html']);
})
);
});
PWA ingredients - Service Worker
self.addEventListener('fetch', function(event) {
event.respondWith(
fetch(event.request)
.catch(() => {
return caches.open('cache-v1')
.then((cache) => {
return cache.match('offline.html');
});
}));
});
Web for content and creation
Web |
Consumable and interactive content |
Reading / watching / buying / creative / working / gaming |
Tabbed browser / standalone window |
Works online and offline |
Search + navigate OR install |
PWA User Interface - Now and the future
PWA installation is fully shipped
Android
Chrome OS
Windows
Linux
macOS
Custom Tab for Out of Scope Links
Custom Tab for Out of Scope Links
Tabbed application mode - early mock
PWA Capabilities - Now and the future
Empowering the web platform safely
Tentative launch cal for in-flight APIs
M75
M76
M77
M78
M79
2019
Q1
Q2
Q3
Q4
M73
M72
M74
M75
M79
M76
M77
M78
There's much more to hear
PWAs are a vehicle for all of you
We need you
Thanks!
dominickn@chromium.org
@dominickng