from web site to web app: fantastic optimisations and where to find them

115
#SearchLove @goutaste From Website to Web-App: Fantastic Optimisations and Where to Find Them

Upload: mobilemoxie

Post on 22-Jan-2018

225 views

Category:

Marketing


0 download

TRANSCRIPT

Page 1: From Web Site to Web App: Fantastic Optimisations and Where To Find Them

#SearchLove@goutaste

From Website to Web-App: Fantastic Optimisations

and Where to Find Them

Page 2: From Web Site to Web App: Fantastic Optimisations and Where To Find Them

#SearchLove@goutaste

So Many Format Options to Display Your Content on “The Internet”

Page 3: From Web Site to Web App: Fantastic Optimisations and Where To Find Them

#SearchLove@goutaste

How Do You Choose?

Page 4: From Web Site to Web App: Fantastic Optimisations and Where To Find Them

#SearchLove@goutaste

Websites Have Great Reach

11.4

4.0

MonthlyUniqueVisitorsTop1kwebproper+esvs.top1kapps

Data:comScoreMobileMetrixAge18+June2016

Page 5: From Web Site to Web App: Fantastic Optimisations and Where To Find Them

#SearchLove@goutaste

Native Apps Have Great Engagement

9.3

188.6

AverageMinutesPerUserTop1kwebproper+esvs.top1kapps

Data:comScoreMobileMetrixAge18+June2016

Page 6: From Web Site to Web App: Fantastic Optimisations and Where To Find Them

#SearchLove@goutaste

Can We Have The Best of Both?

TheREACHofawebsite

TheENGAGEMENTofanapp

Image:hGp://bit.ly/platypus-keytar

Page 7: From Web Site to Web App: Fantastic Optimisations and Where To Find Them

#SearchLove@goutaste

What is a Web App?

TradiNonalMulNpageWebsite SinglePageAppLifecycle

Images:hGp://bit.ly/2rouUqH

Page 8: From Web Site to Web App: Fantastic Optimisations and Where To Find Them

#SearchLove@goutaste

What is a Single Page Web App?

bit.ly/app-shell-img

Page 9: From Web Site to Web App: Fantastic Optimisations and Where To Find Them

#SearchLove@goutaste

What is a Single Page Web App?

bit.ly/app-shell-img

Single page persists with

branding elements

Content changeswithout fullpage reload

Page 10: From Web Site to Web App: Fantastic Optimisations and Where To Find Them

#SearchLove@goutaste

What is a Progressive Web App?

Responsive Secure Fast

Downloadable WorksOffline PushNoNficaNons

Page 11: From Web Site to Web App: Fantastic Optimisations and Where To Find Them

#SearchLove@goutaste

Why are PWAs popular? Mobilesalesincreasedby18%YoY

43%increaseinsessions/user100%increaseinsessionduraNon 80%improvementinloadNme

30%higherConversionRatethannaNveappinTier3ciNes20%ofPWAbookingsarefromuserswho’duninstallednaNveapp

Homepageloadscompletelyin.8seconds

CustomeracquisiNoncostis10Xless Shoppersspend20%moreHmethanonpreviousmobilesite

40%lowerbounceratethanonpreviousmobilesite

hGps://www.pwastats.com/

Page 12: From Web Site to Web App: Fantastic Optimisations and Where To Find Them

#SearchLove@goutaste

The Web is Becoming Full of Web Apps & PWAs

Image © 2016 Warner Bros All Rights Reserved

Page 13: From Web Site to Web App: Fantastic Optimisations and Where To Find Them

#SearchLove@goutaste

Current & Imminent PWAs

Source:GoogleI/O2017

Page 14: From Web Site to Web App: Fantastic Optimisations and Where To Find Them

#SearchLove@goutaste

But Lots of People Don’t Consider SEO for Web Apps

Image © 2016 Warner Bros All Rights Reserved

Page 15: From Web Site to Web App: Fantastic Optimisations and Where To Find Them

#SearchLove@goutaste

Web Apps rely on JavaScript & JavaScript is hard for us

Image © 2016 Warner Bros All Rights Reserved

Page 16: From Web Site to Web App: Fantastic Optimisations and Where To Find Them

#SearchLove@goutaste

“But I’m not a developer…”

Image © 2016 Warner Bros All Rights Reserved

Page 17: From Web Site to Web App: Fantastic Optimisations and Where To Find Them

#SearchLove@goutaste

Things Are Changing, But JavaScript is Also Hard for Search Engines*

*Search Engines means more than just Google

Image © 2016 Warner Bros All Rights Reserved

Page 18: From Web Site to Web App: Fantastic Optimisations and Where To Find Them

#SearchLove@goutaste

So You’ll Still See Plenty of Great Web Apps That Look Like This

Only one page indexed, despite more content!

Page 19: From Web Site to Web App: Fantastic Optimisations and Where To Find Them

#SearchLove@goutaste

Or Sometimes This…

Image © 2016 Warner Bros All Rights Reserved

Page 20: From Web Site to Web App: Fantastic Optimisations and Where To Find Them

#SearchLove@goutaste

We Can Help

Image © 2016 Warner Bros All Rights Reserved

Page 21: From Web Site to Web App: Fantastic Optimisations and Where To Find Them

#SearchLove@goutaste

MeasurementEngagementCrawling & Indexing

URLs

Rendering

“App-iness”

Speed/ Performance

Speed

‘Installs’

Offline & Messages

What We’ll Cover Today

Page 22: From Web Site to Web App: Fantastic Optimisations and Where To Find Them

#SearchLove@goutaste

1. CRAWLING & INDEXING

Image © 2016 Warner Bros All Rights Reserved

Page 23: From Web Site to Web App: Fantastic Optimisations and Where To Find Them

#SearchLove@goutaste

Web Apps Don’t Have to Change URLs to Change Content on the Page

Even on the finance tab, the URL still stays the same

Crawling & Indexing

Page 24: From Web Site to Web App: Fantastic Optimisations and Where To Find Them

#SearchLove@goutaste

But a Web Page Needs a URL To Get Indexed

Crawling & Indexing

No /finance URL existed, so no /finance

page got indexed!

Page 25: From Web Site to Web App: Fantastic Optimisations and Where To Find Them

#SearchLove@goutaste

Old Linking Habits of JS-Heavy Web Applications

By default: https://example.com/#/foo

For deprecated AJAX crawling scheme: https://example.com/#!foo(And ?_escaped_fragment=foo)

Crawling & Indexing

Page 26: From Web Site to Web App: Fantastic Optimisations and Where To Find Them

#SearchLove@goutaste

hJps://example.com/foo

hJps://example.com/foo

Death of the Hash & Hash-Bang

By default: https://example.com/#/foo

For deprecated AJAX crawling scheme: https://example.com/#!foo(And ?_escaped_fragment=foo)

Crawling & Indexing

Page 27: From Web Site to Web App: Fantastic Optimisations and Where To Find Them

#SearchLove@goutaste

Long Live the History API

!  ChangeURLsintheaddressbarwithoutreloadingthewholepage

!  Allowforeffec:veuseofthe“back”bu?on

hGps://css-tricks.com/using-the-html5-history-api/

Crawling & Indexing

Page 28: From Web Site to Web App: Fantastic Optimisations and Where To Find Them

#SearchLove@goutaste

Canonicals.

Canonicals Everywhere.hGps://yoast.com/rel-canonical/

Crawling & Indexing

Image © 2016 Warner Bros All Rights Reserved

Page 29: From Web Site to Web App: Fantastic Optimisations and Where To Find Them

#SearchLove@goutaste

Let’s talk about rendering…

Crawling & Indexing

Image © 2016 Warner Bros All Rights Reserved

Page 30: From Web Site to Web App: Fantastic Optimisations and Where To Find Them

#SearchLove@goutaste

Welcome to the JavaScript Web ViewSource InspectElement

Crawling & Indexing

Page 31: From Web Site to Web App: Fantastic Optimisations and Where To Find Them

#SearchLove@goutaste

Welcome to the JavaScript Web ViewSource InspectElement

OriginalHTML TheDOMasitwasinterpretedbythebrowser.

Crawling & Indexing

Page 32: From Web Site to Web App: Fantastic Optimisations and Where To Find Them

#SearchLove@goutaste

Schedule

Crawl Index Rank

KnownURLs

Internet

Ye Olde Days*

*andmanysearchenginestoday

Crawling & Indexing

Page 33: From Web Site to Web App: Fantastic Optimisations and Where To Find Them

#SearchLove@goutaste

Schedule

Crawl Index Rank

Render!

KnownURLs

Internet

How Google Can Work Today Crawling & Indexing

Page 34: From Web Site to Web App: Fantastic Optimisations and Where To Find Them

#SearchLove@goutaste

Crawling & Indexing

Page 35: From Web Site to Web App: Fantastic Optimisations and Where To Find Them

#SearchLove@goutaste

Crawling & Indexing

Search Engines can render JS now. It’s not a

problem for SEO.

“ “ - A Developer You Probably Work With

Image © 2016 Warner Bros All Rights Reserved

Page 36: From Web Site to Web App: Fantastic Optimisations and Where To Find Them

#SearchLove@goutaste

But Uh… Good Luck With That Googlebot may only be willing to wait 4-5 sec for your JS to render…

hGps://maxxeight.com/tests/js-Nmer/@maxxeight

Crawling & Indexing

Page 37: From Web Site to Web App: Fantastic Optimisations and Where To Find Them

#SearchLove@goutaste

Crawling & Indexing

And What About Other Search Engines?

@bart_goralewicz hGps://moz.com/blog/search-engines-ready-for-javascript-crawling

Page 38: From Web Site to Web App: Fantastic Optimisations and Where To Find Them

#SearchLove@goutaste

So, say a prayer to the god of your choice & hope Google figures out your JavaScript?

Crawling & Indexing

Image © 2016 Warner Bros All Rights Reserved

Page 39: From Web Site to Web App: Fantastic Optimisations and Where To Find Them

#SearchLove@goutaste

You Have A Few (Better) Options

Crawling & Indexing

Image © 2016 Warner Bros All Rights Reserved

Page 40: From Web Site to Web App: Fantastic Optimisations and Where To Find Them

#SearchLove@goutaste

Option #1: You Handle The “Rendering” Before Google Has To

& send Google something they can understand without rendering

Crawling & Indexing

Image © 2016 Warner Bros All Rights Reserved

Page 41: From Web Site to Web App: Fantastic Optimisations and Where To Find Them

#SearchLove@goutaste

Client Side vs. Server Side Rendering

Crawling & Indexing

Page 42: From Web Site to Web App: Fantastic Optimisations and Where To Find Them

#SearchLove@goutaste

Schedule

Crawl Index Rank

Render!

KnownURLs

Internet

How Google Can Work Today Crawling & Indexing

Page 43: From Web Site to Web App: Fantastic Optimisations and Where To Find Them

#SearchLove@goutaste

Schedule

Crawl Index Rank

Render!

KnownURLs

Internet

But if we render, Google doesn’t have to Crawling & Indexing

Page 44: From Web Site to Web App: Fantastic Optimisations and Where To Find Them

#SearchLove@goutaste

Server Side Rendering Your Content

h?ps://www.youtube.com/watch?v=0wvZ7gakqV4

IfyousearchforanycompeNNvekeywordterms,it’salwaysgoingtobeserverrenderedsites.AndthereasonisbecausealthoughGoogledoesindexclient-siderenderedHTML,it’snotperfectyetandothersearchenginesdon’tdoitaswell.SoifyoucareaboutSEO,yous+llneedtohaveserver-renderedcontent.

“ “

--JeffWhelpley

Crawling & Indexing

Page 45: From Web Site to Web App: Fantastic Optimisations and Where To Find Them

#SearchLove@goutaste

After Your Server-Rendered Content Loads, Then Boot Up Your Client-Side JS On Top for Further Nav

Crawling & Indexing

(Otherwise You Lose the Benefits of a Single Page App)

Image © 2016 Warner Bros All Rights Reserved

Page 46: From Web Site to Web App: Fantastic Optimisations and Where To Find Them

#SearchLove@goutaste

Option #1a: “Isomorphic JavaScript”

Crawling & Indexing

Image © 2016 Warner Bros All Rights Reserved

Page 47: From Web Site to Web App: Fantastic Optimisations and Where To Find Them

#SearchLove@goutaste

WTF Is “Isomorphic JavaScript”?

JavaScriptcodethatcanrunonboththeclientandtheserver.Synonyms:UniversalJavaScript,SharedJavaScript,PortableJavascript

Crawling & Indexing

Image © 2016 Warner Bros All Rights Reserved

Page 48: From Web Site to Web App: Fantastic Optimisations and Where To Find Them

#SearchLove@goutaste

Isomorphism is a Spectrum

@spikebrehm hGp://bit.ly/isomorphic-deck

Crawling & Indexing

Page 49: From Web Site to Web App: Fantastic Optimisations and Where To Find Them

#SearchLove@goutaste

Isomorphism is a Spectrum Crawling & Indexing

Page 50: From Web Site to Web App: Fantastic Optimisations and Where To Find Them

#SearchLove@goutaste

Use Headless Browsers to render & serialize initial state of the page. Serve this to users

without JS & to search engines.

hGp://bit.ly/headless-chrome

Option #1b?

Crawling & Indexing

Page 51: From Web Site to Web App: Fantastic Optimisations and Where To Find Them

#SearchLove@goutaste

Crawling & Indexing

github.com/GoogleChrome/rendertron

Or Leverage Existing Solutions That Do This For You

Prerender.io

Page 52: From Web Site to Web App: Fantastic Optimisations and Where To Find Them

#SearchLove@goutaste

Option #2: Focus Only on Getting Google to Render Your Client-side JS Effectively

“ “ Crawling & Indexing

hGps://www.chromestatus.com/features#milestone%3C%3D41hGps://commondatastorage.googleapis.com/chromium-browser-snapshots/index.html?prefix=Win/310958/

Page 53: From Web Site to Web App: Fantastic Optimisations and Where To Find Them

#SearchLove@goutaste

Use Feature

Detection &

“Polyfills”

hGps://github.com/Modernizr/Modernizr/wiki/HTML5-Cross-browser-Polyfills

Crawling & Indexing

Page 54: From Web Site to Web App: Fantastic Optimisations and Where To Find Them

#SearchLove@goutaste

hGps://www.google.com/webmasters/tools/googlebot-fetch

Test in Chrome 41 and Fetch & Render

Crawling & Indexing

Page 55: From Web Site to Web App: Fantastic Optimisations and Where To Find Them

#SearchLove@goutaste

Fetch & Render As Any Bot

@maxxeight hGps://technicalseo.com/seo-tools/fetch-render/

Crawling & Indexing

Page 56: From Web Site to Web App: Fantastic Optimisations and Where To Find Them

#SearchLove@goutaste

2. ENGAGEMENT

Image © 2016 Warner Bros All Rights Reserved

Page 57: From Web Site to Web App: Fantastic Optimisations and Where To Find Them

#SearchLove@goutaste

Remember this? Mobilesalesincreasedby18%YoY

43%increaseinsessions/user100%increaseinsessionduraNon 80%improvementinloadNme

30%higherConversionRatethannaNveappinTier3ciNes20%ofPWAbookingsarefromuserswho’duninstallednaNveapp

Homepageloadscompletelyin.8seconds

CustomeracquisiNoncostis10Xless Shoppersspend20%moreHmethanonpreviousmobilesite

40%lowerbounceratethanonpreviousmobilesite

hGps://www.pwastats.com/

EngagementCrawling & Indexing

Page 58: From Web Site to Web App: Fantastic Optimisations and Where To Find Them

#SearchLove@goutaste

The App-Like Web: Progressive Web Apps

EngagementCrawling & Indexing

Launch from homescreen/ Fullscreen mode

Send push notifications“Install” web app:Add to Homescreen web banner

Page 59: From Web Site to Web App: Fantastic Optimisations and Where To Find Them

#SearchLove@goutaste

Offline in Action

EngagementCrawling & Indexing

Page 60: From Web Site to Web App: Fantastic Optimisations and Where To Find Them

#SearchLove@goutaste

The offline experience

your web-app delivers can

even be different from

the online experience

EngagementCrawling & Indexing

Page 61: From Web Site to Web App: Fantastic Optimisations and Where To Find Them

#SearchLove@goutaste

Offline-Only Content EngagementCrawling & Indexing

Page 62: From Web Site to Web App: Fantastic Optimisations and Where To Find Them

#SearchLove@goutaste

PWAs = Death to the Dino

(SomeoneelsemadethisillustraNon,andIphotographedit.NowIcannotrememberwho.SORRY.)

EngagementCrawling & Indexing

Page 63: From Web Site to Web App: Fantastic Optimisations and Where To Find Them

#SearchLove@goutaste

EngagementCrawling & Indexing

Basic PWA Technical Requirements

Image © 2016 Warner Bros All Rights Reserved

Page 64: From Web Site to Web App: Fantastic Optimisations and Where To Find Them

#SearchLove@goutaste

1. App Manifest

hGp://bit.ly/webapp-manifest

Chrome Dev Tools ViewJSON file you link to in your <head>

EngagementCrawling & Indexing

Page 65: From Web Site to Web App: Fantastic Optimisations and Where To Find Them

#SearchLove@goutaste

2. Service Worker

WebApp Network

Cache

ServiceWorker

Get/hero.png

Iborrowedthisanalogyfrom@jeffposnick

EngagementCrawling & Indexing

Page 66: From Web Site to Web App: Fantastic Optimisations and Where To Find Them

#SearchLove@goutaste

2. Service Worker

WebApp Network

Cache

ServiceWorker

Get/hero.png

Iborrowedthisanalogyfrom@jeffposnick

EngagementCrawling & Indexing

Page 67: From Web Site to Web App: Fantastic Optimisations and Where To Find Them

#SearchLove@goutaste

2. Service Worker

WebApp Network

Cache

ServiceWorker

Get/hero.png

Iborrowedthisanalogyfrom@jeffposnick

EngagementCrawling & Indexing

Page 68: From Web Site to Web App: Fantastic Optimisations and Where To Find Them

#SearchLove@goutaste

2. Service Worker

WebApp Network

Cache

ServiceWorker

Get/hero.png

Iborrowedthisanalogyfrom@jeffposnick

EngagementCrawling & Indexing

Page 69: From Web Site to Web App: Fantastic Optimisations and Where To Find Them

#SearchLove@goutaste

3. https Mobile Friendly Website

EngagementCrawling & Indexing

Page 70: From Web Site to Web App: Fantastic Optimisations and Where To Find Them

#SearchLove@goutaste

Page 71: From Web Site to Web App: Fantastic Optimisations and Where To Find Them

#SearchLove@goutaste

You don’t need to be a SPA or use a JS framework. A normal site with Vanilla JS can become a PWA.

EngagementCrawling & IndexingImage © 2016 Warner Bros All Rights Reserved

Page 72: From Web Site to Web App: Fantastic Optimisations and Where To Find Them

#SearchLove@goutaste

PWAs ‘By Default’ via React, Preact, or Vue CLIs

Preact CLI

@addyosmani hGps://youtu.be/aCMbSyngXB4

EngagementCrawling & Indexing

create-react-app vue init pwa

Page 73: From Web Site to Web App: Fantastic Optimisations and Where To Find Them

#SearchLove@goutaste

Lighthouse

EngagementCrawling & Indexing

Page 74: From Web Site to Web App: Fantastic Optimisations and Where To Find Them

#SearchLove@goutaste

Speeding Things Up

EngagementCrawling & Indexing

Image © 2016 Warner Bros All Rights Reserved

Page 75: From Web Site to Web App: Fantastic Optimisations and Where To Find Them

#SearchLove@goutaste

Source:@lukew

EngagementCrawling & Indexing

Page 76: From Web Site to Web App: Fantastic Optimisations and Where To Find Them

#SearchLove@goutaste

EngagementCrawling & Indexing

Improved Engagement With Speed

hGp://wpostats.com

Page 77: From Web Site to Web App: Fantastic Optimisations and Where To Find Them

#SearchLove@goutaste@addyosmani

“The bloat of your baseline defines how much headroom you have for app code”

How much is taken up by your framework?

hGp://bit.ly/pwas-the-new-normal

EngagementCrawling & Indexing

Page 78: From Web Site to Web App: Fantastic Optimisations and Where To Find Them

#SearchLove@goutaste

Service Workers

Can Speed Up Sites

on Repeat Views

EngagementCrawling & Indexing

Page 79: From Web Site to Web App: Fantastic Optimisations and Where To Find Them

#SearchLove@goutaste

self.addEventListener('install', function(event) { event.waitUntil( caches.open(cacheName).then(function(cache) { return cache.addAll( [ '/css/bootstrap.css', '/css/main.css', '/js/bootstrap.min.js', '/js/jquery.min.js', '/offline.html' ] ); }) );});

Set Up Your Service Worker to Cache Essential Assets At Install

hGp://bit.ly/sw-caching

EngagementCrawling & Indexing

Page 80: From Web Site to Web App: Fantastic Optimisations and Where To Find Them

#SearchLove@goutaste

Cache App ‘Shell’

hGps://developers.google.com/web/fundamentals/architecture/app-shell

EngagementCrawling & Indexing

Page 81: From Web Site to Web App: Fantastic Optimisations and Where To Find Them

#SearchLove@goutaste

Set Up Your Service Worker to Cache Essential Assets on User Interaction

document.querySelector('.cache-article').addEventListener('click', function(event) { event.preventDefault(); var id = this.dataset.articleId; caches.open('mysite-article-' + id).then(function(cache) { fetch('/get-article-urls?id=' + id).then(function(response) { // /get-article-urls returns a JSON-encoded array of // resource URLs that a given article depends on return response.json(); }).then(function(urls) { cache.addAll(urls); }); });});

(ex. “save for offline” button)

hGp://bit.ly/sw-caching

EngagementCrawling & Indexing

Page 82: From Web Site to Web App: Fantastic Optimisations and Where To Find Them

#SearchLove@goutaste

But That Doesn’t Mean You Are Done & Can Avoid Optimising for Performance

EngagementCrawling & Indexing

Image © 2016 Warner Bros All Rights Reserved

Page 83: From Web Site to Web App: Fantastic Optimisations and Where To Find Them

#SearchLove@goutaste

Still Do The Basics Put Everything on a Diet:

–  Minify JS & CSS files–  Compress files & images–  Less unnecessary files–  Less unnecessary markup

(ie code comments)–  Don’t send code that this

page doesn’t need

EngagementCrawling & Indexing

Image © 2016 Warner Bros All Rights Reserved

Page 84: From Web Site to Web App: Fantastic Optimisations and Where To Find Them

#SearchLove@goutaste

EngagementCrawling & Indexing

hGps://images.guide@addyosmani

hGps://images.guide

Page 85: From Web Site to Web App: Fantastic Optimisations and Where To Find Them

#SearchLove@goutaste

Best Practices for Fast First Load

" InlinemostcriNcalCSS&JS

" Removeallrender-blockingscriptsfromthe<head>

hGps://youtu.be/6Ljq-Jn-EgU

EngagementCrawling & Indexing

Image © 2016 Warner Bros All Rights Reserved

Page 86: From Web Site to Web App: Fantastic Optimisations and Where To Find Them

#SearchLove@goutaste

But I’ve Done All This & My First

Paint Times Are ROCKING

“ “ - Someone in the audience

EngagementCrawling & Indexing

Image © 2016 Warner Bros All Rights Reserved

Page 87: From Web Site to Web App: Fantastic Optimisations and Where To Find Them

#SearchLove@goutaste

OneoftheIssuesWithServer-SideRenderingis

TheTrade-OffWithTimeto

InteracHve

SimulatedSlowNetworkhGps://youtu.be/6Ljq-Jn-EgU

Page 88: From Web Site to Web App: Fantastic Optimisations and Where To Find Them

#SearchLove@goutaste

OneoftheIssuesWithServer-SideRenderingis

TheTrade-OffWithTimeto

InteracHve

SimulatedSlowNetworkhGps://youtu.be/6Ljq-Jn-EgU

Page 89: From Web Site to Web App: Fantastic Optimisations and Where To Find Them

#SearchLove@goutaste

TTI has a �high

correlation with

conversion rates

bit.ly/google-measure-performance

EngagementCrawling & Indexing

Page 90: From Web Site to Web App: Fantastic Optimisations and Where To Find Them

#SearchLove@goutasteSeeAlso:hGp://bit.ly/code-splitng-webpackREADTHISTOSTART:hGps://survivejs.com/webpack/building/code-splitng/

EngagementCrawling & Indexing

" BreakupexisNngJSintosmallerchunks(“CodeSplitng”)

Make it Useable Faster: Minimise Time Between FMP & TTI

Page 91: From Web Site to Web App: Fantastic Optimisations and Where To Find Them

#SearchLove@goutaste

" BreakupexisNngJSintosmallerchunks(“CodeSplitng”)

" FollowthePRPL(‘purple’)PaGern*

hGp://bit.ly/push-render-precache-lazyload

*”push”referencesH/2pushandrequiresh?p2

EngagementCrawling & Indexing

Make it Useable Faster: Minimize Time Between FMP & TTI

Page 92: From Web Site to Web App: Fantastic Optimisations and Where To Find Them

#SearchLove@goutaste

Link Rel=Preload

Pre-loadislikesaying,“Hey,browser!Here’saresourceyou’regoingtoneedlateron,sostartloadingitnow.”

•  Pre-load can specify the download “as” =•  "script", JavaScript file•  "style", Stylesheet•  "image", image file•  “font”, font file•  ”video", video file•  "document” html document for embedding•  And more…

bit.ly/what-is-rel-preload

HTTP/2 + Preload = Moves the ‘start download’ time of a critical asset closer to initial request

EngagementCrawling & Indexing

Page 93: From Web Site to Web App: Fantastic Optimisations and Where To Find Them

#SearchLove@goutaste

Link Rel=Preload

EngagementCrawling & Indexing

Commonly used for Web Fonts; Also great for critical JS & CSS files

VS

hGps://speakerdeck.com/addyosmani/the-browser-hackers-guide-to-instant-loading

Page 94: From Web Site to Web App: Fantastic Optimisations and Where To Find Them

#SearchLove@goutaste

Subjective Performance

Improves Engagement, Too

How do we make waits feel faster?

EngagementCrawling & Indexing

Image © 2016 Warner Bros All Rights Reserved

Page 95: From Web Site to Web App: Fantastic Optimisations and Where To Find Them

#SearchLove@goutaste

For 2 Sec+ Waits: Progress Bars

Chris Harrison, Zhiquan Yeo, Scott E. HudsonCarnegie Mellon

hGp://www.chrisharrison.net/projects/progressbars2/ProgressBarsHarrison.pdf

Progress bars with backwards decelerating bands feel

12% faster

EngagementCrawling & Indexing

Page 96: From Web Site to Web App: Fantastic Optimisations and Where To Find Them

#SearchLove@goutaste

Progress Bars

hGp://www.chrisharrison.net/projects/progressbars2/ProgressBarsHarrison.pdf

EngagementCrawling & Indexing

Page 97: From Web Site to Web App: Fantastic Optimisations and Where To Find Them

#SearchLove@goutaste

MEASUREMENT3. MEASUREMENT

Image © 2016 Warner Bros All Rights Reserved

Page 98: From Web Site to Web App: Fantastic Optimisations and Where To Find Them

#[email protected]

These are the basics we all still get wrong

PageSpeed Tool Scores Aren’t Helpful But the Advice Can Sometimes Still Tell You Something

EngagementCrawling & Indexing Measurement

Page 99: From Web Site to Web App: Fantastic Optimisations and Where To Find Them

#SearchLove@goutaste

WebPageTest Has More Useful Feedback EngagementCrawling & Indexing Measurement

PROTIP:Trywebpagetest.org/easyforthroGled,low-enddevice

Page 100: From Web Site to Web App: Fantastic Optimisations and Where To Find Them

#SearchLove@goutaste

Performance Tab in Chrome Dev Tools

EngagementCrawling & Indexing Measurement

(Formerly Called ‘Timeline’)

More Simulated ‘Lab’ Testing

Page 101: From Web Site to Web App: Fantastic Optimisations and Where To Find Them

#SearchLove@goutaste

Reality: Load metrics aren’t a single number & real user metrics paint a fuller picture

hGps://youtu.be/6Ljq-Jn-EgU

EngagementCrawling & Indexing Measurement

Page 102: From Web Site to Web App: Fantastic Optimisations and Where To Find Them

#SearchLove@goutasteLearnmoreaboutusingPerformanceObserver:hGps://developers.google.com/web/updates/2017/06/user-centric-performance-metrics

EngagementCrawling & Indexing Measurement

But beware of survivorship bias

Track Real Users’ Load Times with Browser APIs (like PerformanceObserver)

Page 103: From Web Site to Web App: Fantastic Optimisations and Where To Find Them

#SearchLove@goutaste

Measuring “Installs” from the Chrome

PWA Install Banner

EngagementCrawling & Indexing Measurement

Page 104: From Web Site to Web App: Fantastic Optimisations and Where To Find Them

#SearchLove@goutaste

Measuring “Installs” window.addEventListener('beforeinstallprompt', function(e) { // beforeinstallprompt Event fired

// e.userChoice will return a Promise. // For more details read: https://developers.google.com/web/fundamentals/getting-started/primers/promises

e.userChoice.then(function(choiceResult) {

console.log(choiceResult.outcome);

if(choiceResult.outcome == 'dismissed') { console.log('User cancelled home screen install'); } else {

console.log('User added to home screen'); } });});

EngagementCrawling & Indexing Measurement

Page 105: From Web Site to Web App: Fantastic Optimisations and Where To Find Them

#SearchLove@goutaste

Measuring “Launches”Add a tracking parameter to your “start_url” in the App Manifest

EngagementCrawling & Indexing Measurement

Page 106: From Web Site to Web App: Fantastic Optimisations and Where To Find Them

#[email protected]/track-offline

How Do You Record Offline “Traffic”?

EngagementCrawling & Indexing Measurement

Page 107: From Web Site to Web App: Fantastic Optimisations and Where To Find Them

#SearchLove@goutaste

Measuring Push Notifications

bit.ly/GA-push-tracking

EngagementCrawling & Indexing Measurement

Page 108: From Web Site to Web App: Fantastic Optimisations and Where To Find Them

#SearchLove@goutaste

Thank You! var me = {

name: “Emily Grossman”,title: “Director of App Strategy”,work: “MobileMoxie”,twitter: “@goutaste”,house: “slytherin”

};

var cat = {name: “Daenerys Furborn of the House Grossman, First of Her Name, the Unfed, Queen of the Bengals, Catleesi of the Great Scratching post, Breaker of Treats and Mother of Cuddles”

};

Page 109: From Web Site to Web App: Fantastic Optimisations and Where To Find Them

#SearchLove@goutaste

Super-Smart, Helpful People

@ipullrank

@samccone@slightlylate

TechnicalSEO

PerformancePWAs&Perf

@basgrPerformance&SEO

@addyosmaniPWAs&Chrome

@theLarkInnWebpack

@bart_goralewiczJSSEO

@maxxeightTechnical&JSSEO

@jonoaldersonRobots&rants

@alexisksandersTechnical&JSSEO

@eywuTechnical&JSSEO

@suzzicksMobile

Page 110: From Web Site to Web App: Fantastic Optimisations and Where To Find Them

#SearchLove@goutaste

One Last Thing… Image © 2016 Warner Bros All Rights Reserved

BonusSlide!

Page 111: From Web Site to Web App: Fantastic Optimisations and Where To Find Them

#SearchLove@goutastehGps://caniuse.com/#search=service%20workers

BonusSlide!

Page 112: From Web Site to Web App: Fantastic Optimisations and Where To Find Them

#SearchLove@goutaste

Official Safari Support is Coming “Soon”…

hGps://jakearchibald.github.io/isserviceworkerready/

BonusSlide!

Page 113: From Web Site to Web App: Fantastic Optimisations and Where To Find Them

#SearchLove@goutaste

Polyfills for Safari & Older

Browsers

hGps://github.com/mathiasbynens/cache-polyfill

BonusSlide!

Page 114: From Web Site to Web App: Fantastic Optimisations and Where To Find Them

#SearchLove@goutaste

Lancôme USA

65% of their mobile web users are on iOS

53% increase in session length on iOS after launching PWA

hGps://lancome-usa.com

BonusSlide!

Page 115: From Web Site to Web App: Fantastic Optimisations and Where To Find Them

#SearchLove@goutaste

Other Specifics for iOS •  On iOS, Home Screen icons & splash don’t come from

App Manifest

•  Specify app attributes with link tags in the <head>:–  Icon: <link rel="apple-touch-icon" href="/custom_icon.png">–  Launch Screen Image: <link rel="apple-touch-startup-image" href="/

launch.png">–  App Name: <meta name="apple-mobile-web-app-title" content="AppTitle">–  Enable stand-alone mode: <meta name="apple-mobile-web-app-capable"

content="yes">–  Change status bar color: <meta name="apple-mobile-web-app-status-bar-

style" content="black”>

•  There’s also a Polyfill for ^this: https://github.com/boyofgreen/manUp.js/

BonusSlide!