1 of 33

Progressive Web Apps

State of the Union

Dominick Ng

TL, Web Apps Platform

@dominickng

2 of 33

Agenda

  1. A brief history of Progressive Web Apps
  2. Now and the future
    • User Interface
    • Capabilities

3 of 33

A brief history of PWAs

4 of 33

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

5 of 33

Demand for building apps on web tech

  • Chrome Apps
    • Proprietary APIs :(
  • Electron
    • Shipping entire browsers :(

6 of 33

Mobile saw users flock to apps

  • Capabilities
  • UX treatment
    • Home screen icon
    • Standalone window

7 of 33

PWAs: the best of both worlds

  • Web sites that can become apps
    • Linkable and indexable
    • Opens in a standalone window from launcher
    • Works offline
    • Native OS integration

8 of 33

PWA ingredients - Web app manifest

{

"name": "Squoosh",

"start_url": "/",

"scope": "/",

"display": "standalone",

"background_color": "#fff",

"theme_color": "#f78f21",

"icons": [ ... ]

}

9 of 33

PWA ingredients - Web app manifest

{

"name": "Squoosh",

"start_url": "/",

"scope": "/",

"display": "standalone",

"background_color": "#fff",

"theme_color": "#f78f21",

"icons": [ ... ]

}

10 of 33

PWA ingredients - Web app manifest

{

"name": "Squoosh",

"start_url": "/",

"scope": "/",

"display": "standalone",

"background_color": "#fff",

"theme_color": "#f78f21",

"icons": [ ... ]

}

11 of 33

PWA ingredients - Web app manifest

{

"name": "Squoosh",

"start_url": "/",

"scope": "/",

"display": "standalone",

"background_color": "#fff",

"theme_color": "#f78f21",

"icons": [ ... ]

}

12 of 33

PWA ingredients - Service Worker

// main.js

if 'serviceWorker' in navigator {

navigator.serviceWorker.register(

'/service-worker.js', { scope: '/'});

}

13 of 33

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']);

})

);

});

14 of 33

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');

});

}));

});

15 of 33

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

16 of 33

PWA User Interface - Now and the future

17 of 33

PWA installation is fully shipped

18 of 33

Android

19 of 33

Chrome OS

20 of 33

Windows

21 of 33

Linux

22 of 33

macOS

23 of 33

Custom Tab for Out of Scope Links

24 of 33

Custom Tab for Out of Scope Links

25 of 33

26 of 33

Tabbed application mode - early mock

27 of 33

PWA Capabilities - Now and the future

28 of 33

Empowering the web platform safely

  • Fugu project: new capabilities for the whole web
  • Specs + web platform tests
  • Working closely with security and privacy
  • Capabilities may not be gated on installation

29 of 33

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

30 of 33

There's much more to hear

  • Desiloing Files on the Web
    • Tuesday, Breakout 3, Room 315
  • The Offline Web
    • Tuesday, Breakout 4, Room 105
  • Fugu: Bringing New Capabilities to the Web
    • Wednesday, Breakout 5, Main Stage

31 of 33

PWAs are a vehicle for all of you

  • Broaden the utility of the web platform
  • Make a powerful, compelling app platform
  • Show off the work everyone here does

32 of 33

We need you

  • Distribution is a challenge
  • New capabilities, but laying the path for interoperability
  • Please get involved via crbug.com
    • component UI>Browser>WebAppInstalls (PWAs)
    • label Proj=Fugu (Capabilities)

33 of 33

Thanks!

dominickn@chromium.org

@dominickng