Basic Ionic PWA:
Progressive Web Apps

  • Intro

  • Benefits

  • Limitations

  • Requirements

  • iPhone Kludge

  • Debugging

  • Resources

  • Q & A

PWA Intro

NiemanLab, March 7, 2017
"… Forbes on Tuesday is beginning the public roll out of its new mobile site, which it says loads in 0.8 seconds — down from anywhere from 3 to 12 seconds on its current mobile site."

Xactware Xample
Cut (secondary) app load from 479K to 6K, 21s to 2s (3G)

PWA Benefits

  • FAST - repeat visits are sub-second

  • Fullscreen - no browser navigation on top or bottom

  • Discoverability - quick to try a new app

  • Auto install - user is prompted to add to their homescreen

  • Samsung browser prompts for fingerprint, if supported

  • Session persistence - user stays logged in

  • NOTIFICATIONS - Number One user engagement feature!

PWA Limitations

  • Android Chrome/Samsung browser

  • Must launch from homescreen icon for fullscreen

  • No benefit for apps packaged for the app stores (except shared code base)

 

Benefits outweigh limitations: add PWA to your mobile website!

PWA Requirements

  • https

  • manifest.json - defines your app

  • service-worker.js - file cache list, cache code, notification code, etc.

  • icon(s)

  • "mobile-friendly" - responsive, reasonably quick

iPhone Kludge (not PWA)

  • Fullscreen + icons

  • State is lost when you relaunch or switch apps (fixed w/JWT?)

  • Use only for prototypes or stateless apps & websites

<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="Weather PWA">
<link rel="apple-touch-icon" href="images/icons/icon-152x152.png">

<meta name="msapplication-TileImage" content="images/icons/icon-144x144.png">
<meta name="msapplication-TileColor" content="#2F3BA2">

PWA Debugging

  • Lighthouse - Google PWA analyzer, Chrome extension

  • Chrome Dev Tools - Application tab (& Network tab)

PWA Resources

Q & A

Ionic PWA Basics

By Todd Hale

Ionic PWA Basics

  • 1,174