Lighthouse

A presentation at BrumJS in August 2016 in Birmingham, UK by Stuart Langridge

Slide 1

Slide 1

lighthouse lighthouse

Slide 2

Slide 2

PWA

Slide 3

Slide 3

progressive web apps

Slide 4

Slide 4

PWA

Slide 5

Slide 5

PWA

Slide 6

Slide 6

service worker

Slide 7

Slide 7

service worker manifest

Slide 8

Slide 8

service worker manifest short_name

Slide 9

Slide 9

service worker manifest short_name https

Slide 10

Slide 10

service worker manifest short_name https 144×144 icon

Slide 11

Slide 11

service worker manifest short_name https 144×144 icon loadable front page

Slide 12

Slide 12

service worker manifest short_name https 144×144 icon loadable front page png icon format

Slide 13

Slide 13

service worker manifest short_name https 144×144 icon loadable front page png icon format two visits within an hour

Slide 14

Slide 14

service worker manifest short_name https 144×144 icon loadable front page png icon format two visits within an hour not cancelled with onbeforeinstallprompt

Slide 15

Slide 15

service worker manifest short_name https 144×144 icon loadable front page png icon format two visits within an hour not cancelled with onbeforeinstallprompt ...whatever other requirements come up...

Slide 16

Slide 16

stop the madness stop the madness

Slide 17

Slide 17

lighthouse lighthouse

Slide 18

Slide 18

Slide 19

Slide 19

  • 90% probability of input latency at 16.0ms or shorter.

(50%: 16.0ms, 75%: 16.0ms, 90%: 16.0ms, 99%: 54.1ms, 100%: 67.1ms)

-- Time To Interactive (alpha): 100 (0ms)

-- Content scrolls at 60fps:

-- Touch input gets a response in < 150ms: Site is progressively enhanced: 100%

-- Page contains some content when its scripts are not available: true Network connection is secure: 100%

-- Site is on HTTPS: true

-- Site redirects HTTP traffic to HTTPS: true User can be prompted to Add to Homescreen: 20%

-- Has a registered Service Worker: true

-- Manifest exists: false

Unable to retrieve manifest

-- Manifest contains start_url: false

-- Manifest contains icons at least 144px: false

WARNING: No icons found in the manifest

-- Manifest contains short_name: false Installed web app will launch with custom splash screen: 0%

-- Manifest exists: false

Unable to retrieve manifest

-- Manifest contains name: false

-- Manifest contains background_color: false

-- Manifest contains theme_color: false

-- Manifest contains icons at least 192px: false

WARNING: No icons found in the manifest Address bar matches brand colors: 33%

-- Manifest exists: false

Unable to retrieve manifest

-- HTML has a theme-color <meta>: true (#2196F3)

-- Manifest contains theme_color: false Design is mobile-friendly: 100%

-- HTML has a viewport <meta>: true

-- Content is sized correctly for the viewport: true Name: Best Practices Description: These audits do not affect your score but are worth a look.

-- Element aria-* roles are valid: true

-- Element aria-* attributes are valid ARIA attributes: true

-- Background and foreground colors have a sufficient contrast ratio: false

Elements must have sufficient color contrast (Failed on 1 element)

  • Rating: critical

  • See: https://dequeuniversity.com/rules/axe/1.1/color-contrast

  • Nodes: 1 nodes identified (see HTML output for details)

-- Every image element has an alt attribute: true

-- Every form element has a label: true

-- Manifest's short_name won't be truncated when displayed on homescreen: false

-- Manifest's display property is set: false

Manifest display property should be set.

-- Service worker makes use of push notifications, if appropriate:

-- Tap targets are appropriately sized for touch:

Slide 20

Slide 20

github.com/GoogleChrome/lighthouse

Slide 21

Slide 21

questions? @sil