Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
Differences between Progressive Web Apps and old-school offline webapps

Progressive Web App stack:

  • Service Worker
  • Web App Manifest

Old-school offline webapp stack:

  • Application Cache
  • Touch Icons (apple-touch-icon etc.)
  • apple-mobile-web-app-capable or mobile-web-app-capable

Differences:

  • App install banner
  • Various benefits of SW over AppCache (flexibility, partial cache invalidation, Cache API)
  • Push notifications
  • Media queries for standalone mode
  • Can set the background color on the splash screen
  • Can set the theme (status bar) color on the splash screen
  • Can define a short name vs a long name
  • Can launch in landscape
  • Can launch a custom URL to detect homescreen launch (e.g. index.html?homescreen=true)
  • Must use HTTPS

Non-differences:

  • Can launch in "minimal-ui" mode – same as "browser" on Android, so equivalent to regular AppCache (see below for tracking bug though)
  • Can launch in "fullscreen" mode – same as "standalone" on Android, so equivalent to regular AppCache + mobile-web-app-capable (see below for tracking bug though)

Examples:

  • Forecast.io (AppCache with mobile-web-app-capable, launches from homescreen with splash screen and no URL bar
  • PouchDB.com (Regular AppCache, so launches from homescreen into browser with no splash screen)

minimal-ui doesn't yet do anything on Android.

Owner

nolanlawson commented May 25, 2016

Yup, I just tested to confirm. Seems fullscreen also just falls back to standalone.

Also, in theory (I need to check impl) using the theme-color in the manifest should set it for all pages in the site unless it is overrided by the tag in the page.

Biggest one for me, you define the entry point into your app in the manifest and that is what is launched. Old model is to add the current page to the home screen - you can work around it by detecting launch from homescreen and pushState or redirecting to the root page, but it is a massive hack

fullscreen will be different though in the future, it won't have any phone "chrome" (notification tray and buttons at the footer)

Owner

nolanlawson commented May 25, 2016

Thanks, forgot about that that one! I'll add it.

Ah. we have a display-mode CSS media query that allows you to adjust the styles based on how it was launched.... can't do that with navigator.standalone

Is it possible to support a fallback to AppCache if the browser doesn't support PWA? OR put another way, if you have both, how does a browser that supports PWA behave?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment