The current state of progressive web apps (PWAs)
Tags: webdev, discuss, pwa, webapp
Published: 2019-04-16 08:32:24

---
title: The current state of progressive web apps (PWAs)
published: true
cover_image: https://assets.browserlondon.com/app/uploads/2019/03/pwa-banner-1536x864.png
tags: Webdev,discuss,pwa,webapp
canonical_url: https://www.browserlondon.com/blog/2019/04/15/current-state-progressive-web-app-pwa/
---

Web apps have long played second-fiddle to native ones. While mobile apps benefit from full access to device APIs, snappy performance and support for features such as offline content and push notifications, the stateless and browser sandboxed nature of the web has frequently relegated web-based apps to second choice.

However, in recent years we’ve seen the tide start to turn, particularly with the growth in popularity of [client-side rendering](https://www.browserlondon.com/blog/2015/08/26/performance-enhancing-the-web/) and the increased OS-level support for native only features such as background fetching. This new breed of website is frequently termed a ‘PWA’ (progressive web app), but what does that actually mean?

## Defining progressive web apps

[Originally coined](https://fberriman.com/2017/06/26/naming-progressive-web-apps/) by husband-and-wife duo Frances Berriman and Alex Russell (and now championed by Google), PWAs were initially defined as:

- **Progressive** – work for every user, regardless of browser choice because they’re built with [progressive enhancement](https://www.browserlondon.com/blog/2017/03/14/performance-benefits-progressive-enhancement/) as a core tenet.
- **Responsive** – fit any form factor: desktop, mobile, tablet, or whatever is next.
- **Connectivity independent** – enhanced with service workers to work offline or on low-quality networks.
- **App-like** – feel like an app to the user with [app-style interactions](https://www.browserlondon.com/blog/2016/10/03/how-we-improve-user-experience-with-transitions/) and navigation because it’s built on the app-shell model.
- **Fresh** – always up-to-date thanks to the service worker update process.
- **Safe** – served via HTTPS to prevent snooping and ensure content hasn’t been tampered with.
- **Discoverable** – are identifiable as “applications” thanks to W3C manifests and service worker registration scope allowing search engines to find them.
- **Re-engageable** – make re-engagement easy through features like push notifications.
- **Installable** – allow users to “keep” apps they find most useful on their home screen without the hassle of an app store.
- **Linkable** – easily share via a URL and do not require complex installation.

![A screenshot of the original Google progressive web app page](https://assets.browserlondon.com/app/uploads/2019/03/pwa-google-definition-1024x576.jpg)

However, the current baseline [technical requirements](https://developers.google.com/web/fundamentals/app-install-banners/) in order to make your app ‘installable’ (and therefore a PWA) are merely:

- Served over HTTPS.
- Includes a populated JSON manifest with some metadata about the site.
- Includes a service worker (a background script that sits between the client and the server which is capable of intercepting requests)

It’s this final stipulation, the service worker, which enables the app-like push-notifications, offline support and background updates. However, crucially, all that’s required to meet the PWA technical requirements is that the service worker is present – it doesn’t actually _need_ to be functional or implement any of these features.

Add to this that most modern sites are already served securely, and I’m sure you can see that it’s easy to meet the progressive web app requirements with a minimum of effort. Note, though, that this doesn’t necessarily mean that a given site fulfils the ‘app-like’ qualities that the PWA name (and original definition) suggests.

## Defining app-like

When people think of an ‘app-like’ website, they are usually referring to a SPA (single page application). Instead of dynamically building the site on the server for every request, the same (empty) page is served for all visitors alongside a bundle that contains the application.

In many ways this bears more similarities to how native applications behave than traditional websites – the shell of the application is downloaded to (and runs directly on) the client, followed by content updates dynamically pulled in from an API. Since navigation and interactions happen on-device (instead of requiring a round trip to the server), user-interactions feel ‘snappy’ and instant. This is what Berriman and Russell are referring to with the ‘[app-shell](https://developers.google.com/web/fundamentals/architecture/app-shell)‘ model.

![Screenshot of the app-shell model in use on Flipkart](https://assets.browserlondon.com/app/uploads/2019/03/app-shell-model-1024x576.jpg)

However if your application or website wasn’t built this way from the outset, adopting it would necessitate a complete re-think of the product’s architecture, which is usually not viable. Traditional server-rendered sites still dominate the web and likely will for a long time to come, which is probably why (as [Jason Grisby notes](https://www.slideshare.net/grigs/progressive-web-app-challenges)) Google’s definition of a PWA has since become the more [nebulous trifecta](https://web.archive.org/web/20151218101024/https://developers.google.com/web/progressive-web-apps/) of ‘reliable’, ‘fast’ and ‘engaging’. Even with a traditional website, it’s possible to score well in the progressive web app category on tools such as Google’s own [Lighthouse](https://developers.google.com/web/tools/lighthouse/).

While all sites can (and probably should) implement the baseline PWA requirements – no site _wouldn’t_ benefit from basic offline support, discoverability and HTTPS – the term by definition no longer differentiates between client and server rendered sites. It’s perhaps unsurprising, then, that it means different things to different groups, and that the expectations around it (and marketing or sales thereof) has become somewhat muddied.

## Bad PWA behaviour

Unfortunately, the desire to create a more native-style experience can lead to creating a _worse_ PWA experience than the in-browser mobile site provides.

For starters, the app-manifest allows (although does not require) developers to hide the browser ‘chrome’, containing the share-sheet and address bar. By doing so we immediately remove two core tenants of the original PWA vision: share-ability and link-ability. Gone also is the ‘refresh’ button, meaning there is no way of reloading the page in the event of an error (short of restarting the application).

![Screenshot demonstrating the difference in window chrome between an installed and uninstalled PWA](https://assets.browserlondon.com/app/uploads/2019/03/pwa-installed-vs-uninstalled-1024x576.jpg)

Even worse, on iOS, the application state is currently not persisted. This means that every time the PWA loses focus (e.g. you switch to a different app), it restarts. It’s possible to manually save the application state/current page and restore it on load, but this would have to be written as custom functionality, and the start-up time would be incurred every time focus is switched.

{% vimeo 330463094 %}

Although it’s still early days on iOS (support for service-workers was only recently introduced in version 11.3), it’s hard, at the time of writing, to recommend ‘installing’ a site as a PWA on the platform for this reason.

## Looking forward

There’s a lot to be admired in the core tenants that Berriman and Russell defined, however, we have to be careful in our adoption of the progressive web app term, given its now rather flimsy definition. [Berriman herself says](https://fberriman.com/2017/06/26/naming-progressive-web-apps/):

> ‘The name is for your boss, for your investor… it’s marketing, just like HTML5 had very little to do with actual HTML. PWAs are just a bunch of technologies with a zingy-new brandname that keeps the open web going a bit longer, that helps it compete with the proprietary, the closed, until the next thing (and hopefully the next thing) comes along to keep it sharp and relevant.’

Of course, as support for progressive web app based sites improves on iOS, we’ll continue to benefit from the PWA’s only truly _functional_ requirement: the service worker. Background updates, push notifications and full offline support are all fantastic additions, and will go a long way to negating the need for a traditional cross-platform ‘native’ app.

In the meantime we should, as ever, base our decisions about what technology to use in a given situation on what’s best for the user or client, rather than on what’s garnering the most blog posts.

----

The post [The current state of progressive web apps](https://www.browserlondon.com/blog/2019/04/15/current-state-progressive-web-app-pwa/) appeared first on [Browser London](https://www.browserlondon.com).