The Future of The Web
+Alex Russell
@slightlylate
Does It Have One?
InfoQ.com: News & Community Site
• 750,000 unique visitors/month
• Published in 4 languages (English, Chinese, Japanese and Brazilian
Portuguese)
• Post content from our QCon conferences
• News 15-20 / week
• Articles 3-4 / week
• Presentations (videos) 12-15 / week
• Interviews 2-3 / week
• Books 1 / month
Watch the video with slide
synchronization on InfoQ.com!
http://www.infoq.com/presentations
/web-service-workers-manifest-push
Purpose of QCon
- to empower software development by facilitating the spread of
knowledge and innovation
Strategy
- practitioner-driven conference designed for YOU: influencers of
change and innovation in your teams
- speakers and topics driving the evolution and innovation
- connecting and catalyzing the influencers and innovators
Highlights
- attended by more than 12,000 delegates since 2007
- held in 9 cities worldwide
Presented at QCon San Francisco
www.qconsf.com
flickr.com/photos/frogman2212
flickr.com/photos/usoceangov
WE WON ON
DESKTOP!
...JUST IN TIME
FOR MOBILE TO
EAT THE WORLD
Where Do We Stand?
86%
14%
TIME
SPENT
ON SITES
TIME
SPENT
ON APPS
“Apps continued to
cement their lead, and
commanded 86% of
the average US mobile
consumer’s time”
Flurry 2014/04/01
vs.
Source: comScore Mobile Metrix, U.S., Age 18+, June 2015
13% 87%
Mobile web Apps
IT'S NOT
THE TECH
*: At least not the bits we fixate on.
*
What's Actually Holding
The Web Back On Mobile?
THIS S**T
IT'S 2015
No Other Platform Runs
Desktop Apps On Phones
flickr.com/photos/monado/4405843023
The Web Has No App Model
example.com/
example.com/parts/item
vs.
Boring Browser Stuff:
1. The great GPU divide
2. Input metaphor retrofit
3. Chip architecture switch
So, What Explains All
This E-Commerce
Success?
86%
14%
TIME
SPENT
ON SITES
TIME
SPENT
ON APPS
14%
40%
GAMING &
ENT.
28%
SOCIAL
20%
OTHER
66%
SITES
6%
APPS
28%
SITES &
APPS
PRIMARY CHANNEL FOR
COMMERCIAL TASKS
USER TIME SPENT
ON MOBILE DEVICES
80%OF TIME SPENT IS IN
USERS’ TOP 3 APPS
Source: comScore Mobile Metrix, U.S., Age 18+, June 2015
fiksu.com/resources/fiksu-indexes
flickr.com/photos/dhollister
flickr.com/photos/marktee
More Advice We Actually
Have To Give In 2015:
average apps used
per month by
a mobile user
27
sites navigated to per
month by the average
Chrome for Android user
100+
Source: Nielsen Mobile Report June 2015
Distribution Is The Hardest
Problem In Software
flickr.com/photos/blakespot/
IT'S THE
FRICTION
Load store
Click install
Accept permissions
Download, wait...
Find in store
Use
Let’s say I
intrigued
~1000 of you
800
640
512
410
328
262
“In a consumer
mobile app, every
step you make a
user perform
before they get
value out of your
app will cost you
~20% of users...”
http://blog.gaborcselle.com/2012/10/every-step-costs-you-20-of-users.html
...but what if I
can get users
directly into a
store/install
flow?
Click install 800
Accept permissions 640
Download, wait 512
Find, Use 410
flickr.com/photos/128220700@N05
So What's Missing?
1. Homescreen Access
2. Push Notifications
3. Offline
1. Homescreen Access
Less typing, more tapping.
"PROGRESSIVE WEB APPS"
...
<meta name="description" content="Chrome Dev Summit is your opportunity to....">
<meta name="viewport"
content="width=device-width, minimum-scale=1.0, initial-scale=1.0, user-scalable=yes">
<title>Chrome Dev Summit 2014</title>
<meta itemprop="name" content="Chrome Dev Summit">
<meta itemprop="image" content="/devsummit/images/chrome-dev-summit-masthead-1.jpg">
<meta name="mobile-web-app-capable" content="yes">
<link rel="icon" sizes="192x192" href="/devsummit/images/chrome-touch-icon-192x192.png">
<meta id="theme-color" name="theme-color" content="#362A6C">
<!-- Add to homescreen for Safari on iOS -->
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black">
<meta name="apple-mobile-web-app-title" content="Chrome Dev Summit">
<!-- Tile icon for Win8 (144x144 + tile color) -->
<meta name="msapplication-TileImage" content="/devsummit/images/ms-touch-icon-144x144-precomposed.png">
<meta name="msapplication-TileColor" content="#362A6C">
...
Currently, On EVERY PAGE These are VERY VALUABLE bytes
<meta name="theme-color" content="#303F9F">
<link rel="manifest" href="manifest.json">
HTML
{
"short_name": "PolyAir",
"name": "Polymer Airlines",
"start_url": "/",
"display": "standalone",
"icons": [{
"src": "icons/icon-192.png",
"sizes": "192x192",
"type": "image/png",
"density": "4.0"
}],
"orientation": "portrait",
"gcm_sender_id": "129757602160"
}
JSON Manifest
With Manifests
Metadata delegated to one file
Extensible & crawlable
2. Push Notifications
Equal access to system UI matters
1. Works Even If Browser Closed
2. Requires Service Worker
3. Doesn't Require Install
+50%
repeat visits within 3 months
3. Offline That Works™
It isn't an app if it doesn't start when you tap.
Gears Started in 2006
Browsers Have Failed
at Offline for ~10 Years
example.com
GET /app.html HTTP/1.1
HOST example.com
...
HTTP/1.1 200 OK
Date: Thu, 19 Feb 2015 05:21:56 GMT
...
example.com
// sw.js
onfetch = function(e) {
if(e.request.url == "app.html") {
e.respondWith(
caches.match(e.request)
);
}
if(e.request.url == "content.json") {
// go to the network for updates,
// meanwhile, use cached content
fetch(...).then(function(r) {
r.asJSON().then(function(json) {
e.client.postMessage(json);
});
});
}
};
GET /app.html HTTP/1.1
HOST example.com
...
GET /content.json HTTP/1.1
HOST example.com
... GET /content.json HTTP/1.1
HOST example.com
...
HTTP/1.1 200 OK
Date: Thu, 19 Feb 2015...
...
Service Workers Are
Network Progressive
Enhancement
Progressive Apps work without SW for first load & old browsers.
Load URL
Use
Progressive upgrade...
// register Service Worker in index.html
if ('serviceWorker' in navigator) {
navigator.serviceWorker.register('/v1/sw.js').then(reg => {
console.log("Registration succeeded!");
}).catch(error => {
console.log("Registration failed with" + error);
});
}
Service Worker begins the
progressive upgrade by
initiating the registration
process while the user is
interacting with the page...
Photo: Pete LePage
Anatomy Of A
Progressive App:
The Airhorner
https://airhorner.com
Getting Set Up For Success:
TLS,
Client & Server Render,
Local Data + Sync
+Alex Russell
@slightlylate
Thank you!
November 2015 - Flipkart re-launches mobile web app
"There have been a few turning points in the history of
the web platform that radically changed how web apps
were built, deployed and experienced."
"Mobile Engineering team at Flipkart discovered that
with right set of capabilities in a browser, a mobile web
app can be as performant as a native app."
"We believe more browser companies and developers
will start thinking in these lines and make web apps even
better. The web is truly what you make of it, and we have
only just begun."
Facebook presenting at @Scale
Push notifications are working!
Watch the video with slide synchronization on
InfoQ.com!
http://www.infoq.com/presentations/web-
service-workers-manifest-push

The Future of The Web Platform: Does It Have One?

  • 1.
    The Future ofThe Web +Alex Russell @slightlylate Does It Have One?
  • 2.
    InfoQ.com: News &Community Site • 750,000 unique visitors/month • Published in 4 languages (English, Chinese, Japanese and Brazilian Portuguese) • Post content from our QCon conferences • News 15-20 / week • Articles 3-4 / week • Presentations (videos) 12-15 / week • Interviews 2-3 / week • Books 1 / month Watch the video with slide synchronization on InfoQ.com! http://www.infoq.com/presentations /web-service-workers-manifest-push
  • 3.
    Purpose of QCon -to empower software development by facilitating the spread of knowledge and innovation Strategy - practitioner-driven conference designed for YOU: influencers of change and innovation in your teams - speakers and topics driving the evolution and innovation - connecting and catalyzing the influencers and innovators Highlights - attended by more than 12,000 delegates since 2007 - held in 9 cities worldwide Presented at QCon San Francisco www.qconsf.com
  • 6.
  • 7.
  • 8.
  • 9.
    ...JUST IN TIME FORMOBILE TO EAT THE WORLD
  • 10.
  • 11.
    86% 14% TIME SPENT ON SITES TIME SPENT ON APPS “Appscontinued to cement their lead, and commanded 86% of the average US mobile consumer’s time” Flurry 2014/04/01
  • 12.
    vs. Source: comScore MobileMetrix, U.S., Age 18+, June 2015 13% 87% Mobile web Apps
  • 16.
    IT'S NOT THE TECH *:At least not the bits we fixate on. *
  • 17.
    What's Actually Holding TheWeb Back On Mobile?
  • 18.
  • 20.
  • 21.
    No Other PlatformRuns Desktop Apps On Phones
  • 22.
  • 24.
    The Web HasNo App Model
  • 25.
  • 26.
    Boring Browser Stuff: 1.The great GPU divide 2. Input metaphor retrofit 3. Chip architecture switch
  • 27.
    So, What ExplainsAll This E-Commerce Success?
  • 28.
    86% 14% TIME SPENT ON SITES TIME SPENT ON APPS 14% 40% GAMING& ENT. 28% SOCIAL 20% OTHER 66% SITES 6% APPS 28% SITES & APPS PRIMARY CHANNEL FOR COMMERCIAL TASKS USER TIME SPENT ON MOBILE DEVICES
  • 29.
    80%OF TIME SPENTIS IN USERS’ TOP 3 APPS Source: comScore Mobile Metrix, U.S., Age 18+, June 2015
  • 30.
  • 31.
  • 32.
  • 33.
    More Advice WeActually Have To Give In 2015:
  • 34.
    average apps used permonth by a mobile user 27 sites navigated to per month by the average Chrome for Android user 100+ Source: Nielsen Mobile Report June 2015
  • 35.
    Distribution Is TheHardest Problem In Software flickr.com/photos/blakespot/
  • 36.
  • 37.
    Load store Click install Acceptpermissions Download, wait... Find in store Use Let’s say I intrigued ~1000 of you 800 640 512 410 328 262 “In a consumer mobile app, every step you make a user perform before they get value out of your app will cost you ~20% of users...” http://blog.gaborcselle.com/2012/10/every-step-costs-you-20-of-users.html
  • 38.
    ...but what ifI can get users directly into a store/install flow? Click install 800 Accept permissions 640 Download, wait 512 Find, Use 410
  • 41.
  • 42.
    So What's Missing? 1.Homescreen Access 2. Push Notifications 3. Offline
  • 43.
    1. Homescreen Access Lesstyping, more tapping.
  • 50.
  • 52.
    ... <meta name="description" content="ChromeDev Summit is your opportunity to...."> <meta name="viewport" content="width=device-width, minimum-scale=1.0, initial-scale=1.0, user-scalable=yes"> <title>Chrome Dev Summit 2014</title> <meta itemprop="name" content="Chrome Dev Summit"> <meta itemprop="image" content="/devsummit/images/chrome-dev-summit-masthead-1.jpg"> <meta name="mobile-web-app-capable" content="yes"> <link rel="icon" sizes="192x192" href="/devsummit/images/chrome-touch-icon-192x192.png"> <meta id="theme-color" name="theme-color" content="#362A6C"> <!-- Add to homescreen for Safari on iOS --> <meta name="apple-mobile-web-app-capable" content="yes"> <meta name="apple-mobile-web-app-status-bar-style" content="black"> <meta name="apple-mobile-web-app-title" content="Chrome Dev Summit"> <!-- Tile icon for Win8 (144x144 + tile color) --> <meta name="msapplication-TileImage" content="/devsummit/images/ms-touch-icon-144x144-precomposed.png"> <meta name="msapplication-TileColor" content="#362A6C"> ... Currently, On EVERY PAGE These are VERY VALUABLE bytes
  • 53.
    <meta name="theme-color" content="#303F9F"> <linkrel="manifest" href="manifest.json"> HTML { "short_name": "PolyAir", "name": "Polymer Airlines", "start_url": "/", "display": "standalone", "icons": [{ "src": "icons/icon-192.png", "sizes": "192x192", "type": "image/png", "density": "4.0" }], "orientation": "portrait", "gcm_sender_id": "129757602160" } JSON Manifest With Manifests Metadata delegated to one file Extensible & crawlable
  • 54.
    2. Push Notifications Equalaccess to system UI matters
  • 56.
    1. Works EvenIf Browser Closed 2. Requires Service Worker 3. Doesn't Require Install
  • 57.
  • 58.
    3. Offline ThatWorks™ It isn't an app if it doesn't start when you tap.
  • 62.
    Gears Started in2006 Browsers Have Failed at Offline for ~10 Years
  • 63.
    example.com GET /app.html HTTP/1.1 HOSTexample.com ... HTTP/1.1 200 OK Date: Thu, 19 Feb 2015 05:21:56 GMT ...
  • 64.
    example.com // sw.js onfetch =function(e) { if(e.request.url == "app.html") { e.respondWith( caches.match(e.request) ); } if(e.request.url == "content.json") { // go to the network for updates, // meanwhile, use cached content fetch(...).then(function(r) { r.asJSON().then(function(json) { e.client.postMessage(json); }); }); } }; GET /app.html HTTP/1.1 HOST example.com ... GET /content.json HTTP/1.1 HOST example.com ... GET /content.json HTTP/1.1 HOST example.com ... HTTP/1.1 200 OK Date: Thu, 19 Feb 2015... ...
  • 65.
    Service Workers Are NetworkProgressive Enhancement Progressive Apps work without SW for first load & old browsers.
  • 66.
    Load URL Use Progressive upgrade... //register Service Worker in index.html if ('serviceWorker' in navigator) { navigator.serviceWorker.register('/v1/sw.js').then(reg => { console.log("Registration succeeded!"); }).catch(error => { console.log("Registration failed with" + error); }); } Service Worker begins the progressive upgrade by initiating the registration process while the user is interacting with the page...
  • 68.
  • 69.
    Anatomy Of A ProgressiveApp: The Airhorner
  • 70.
  • 71.
    Getting Set UpFor Success: TLS, Client & Server Render, Local Data + Sync
  • 73.
  • 75.
    November 2015 -Flipkart re-launches mobile web app "There have been a few turning points in the history of the web platform that radically changed how web apps were built, deployed and experienced." "Mobile Engineering team at Flipkart discovered that with right set of capabilities in a browser, a mobile web app can be as performant as a native app." "We believe more browser companies and developers will start thinking in these lines and make web apps even better. The web is truly what you make of it, and we have only just begun."
  • 77.
  • 78.
  • 79.
    Watch the videowith slide synchronization on InfoQ.com! http://www.infoq.com/presentations/web- service-workers-manifest-push