Slide 1

Slide 1 text

The Web is a Contender q mobile

Slide 2

Slide 2 text

Surma @surmair

Slide 3

Slide 3 text

voice-memos.appspot.com

Slide 4

Slide 4 text

1B+ Users (25M+ Devs)

Slide 5

Slide 5 text

No content

Slide 6

Slide 6 text

“Reach”

Slide 7

Slide 7 text

100+ websites per month

Slide 8

Slide 8 text

“The mobile war is oveR. . .” “the app has Won” goo.gl/nLFRmY

Slide 9

Slide 9 text

“The is oveR. . .” “the goo.gl/nLFRmY ಠ_ಠ

Slide 10

Slide 10 text

Web Native spent on… 80% 20% goo.gl/nLFRmY

Slide 11

Slide 11 text

Web Native spent on… 22% 20% totally not important stuff goo.gl/nLFRmY

Slide 12

Slide 12 text

Web Native spent on… 52% 48% goo.gl/nLFRmY

Slide 13

Slide 13 text

“Native apps can’t out-web the web” goo.gl/15sYYY

Slide 14

Slide 14 text

goo.gl/15sYYY

Slide 15

Slide 15 text

airhorner.com

Slide 16

Slide 16 text

airhorner.com

Slide 17

Slide 17 text

{ "name": "Air Horner", "short_name": "Air Horner", "icons": [{ "src": "images/touch/Airhorner_128.png", "type": "image/png", "sizes": "128x128" },{ "src": "images/touch/Airhorner_192.png", "type": "image/png", "sizes": "192x192" }], "start_url": "/?homescreen=1", "display": "standalone", "background_color": "#2196F3", "theme_color": "#2196F3" }

Slide 18

Slide 18 text

Service Worker

Slide 19

Slide 19 text

goo.gl/IpsiH1

Slide 20

Slide 20 text

if ('serviceWorker' in navigator) { navigator.serviceWorker .register('/sw.js') .then(function(registration) { // successful }).catch(function(err) { // failure }); }

Slide 21

Slide 21 text

Service Worker

Slide 22

Slide 22 text

var items = [ '/', '/styles/main.css', '/script/main.js' ]; self.addEventListener('install', function(event) { event.waitUntil( caches.open(CACHE_NAME) .then(function(cache) { return cache.addAll(items); }) ); });

Slide 23

Slide 23 text

self.addEventListener('fetch', function(event) { event.respondWith( caches .match(event.request) .then(function(response) { return response || fetch(event.request); })); });

Slide 24

Slide 24 text

wiki-offline.jakearchibald.com

Slide 25

Slide 25 text

wiki-offline.jakearchibald.com

Slide 26

Slide 26 text

sw-toolbox github.com/GoogleChrome/sw-toolbox

Slide 27

Slide 27 text

Service Worker

Slide 28

Slide 28 text

Push Notifications

Slide 29

Slide 29 text

navigator.serviceWorker.ready.then( function(sw) { sw.pushManager.subscribe() .then(function(subscription) { // Send subscription.endpoint // to server }); }); }

Slide 30

Slide 30 text

self.addEventListener('push', function(event) { var n = new Notification('A Message!’); // ... }); self.addEventListener('notificationclick', function(event) { var url = event.notification.data.url; event.waitUntil(clients.openWindow(url)); });

Slide 31

Slide 31 text

simple-push-demo.appspot.com

Slide 32

Slide 32 text

No content

Slide 33

Slide 33 text

HTTPS everywhere letsencrypt.com

Slide 34

Slide 34 text

Surma @surmair Thank you!