Mesaic's View on the Web

Mesaic's View on the Web #1: Progressive web apps & service worker

Progressive web apps have the capabilities and advancements provided by a new technology called "Service Worker". This component enables a number of features that have previously been available to native apps only.

by Sebastian Kellner

The world of Progressive Web Apps

Being diverse, the advancements of the web are sometimes difficult to grasp. New standards and technologies emerge almost every day. Some are fleeting stars, some stay to change the game for good. With new technology standards being implemented within the browser ecosystems of Google Chrome, Safari (Apple) and Firefox (Mozilla) as well as Microsoft's new browser “Edge”, new capabilities and thus great experiences are knocking at the door. The new central piece of innovation in this development: “Service Workers”.

Predominantly coined by Google, the term Progressive Web Apps (PWA) mainly summarizes the capabilities and advancements provided by a new technology called “Service Worker”. This component has the ability to enable a number of features that have previously only been available to native apps. With Service Workers these features are no longer limited to the iOS or Android app ecosystem.

Some of the most important ones are:

  • advanced offline capabilities of web pages
  • push notifications
  • background download of updates

The “Service Worker” hereby intelligently handles the information flow for the specific web-app or webpage and allows a more app-like behavior.

„The term Progressive Web Apps summarizes the capabilities and advancements provided by a new technology called "Service Worker".“

Characteristics of Service Worker

The major aspects and features of service workers are listed below to give an understanding of relevance and advancements, which allow new approaches for web-based applications that we call progressive web apps:

Progressive - Like a webpage, it works for every user regardless of browser choice, because it’s an extension to the web code

Responsive - The PWA is responsive and adapts to any form: desktop, mobile or tablet Connectivity independent - With its offline feature web application can now also run with low or no network connection

App-like feeling - Interactions can be experienced like in a native app tailored to the individual form factor of the device because device and content are not dependent on one another

Up-to-date - With background update processes apps are always up-to-date without the need of manual updating

Safe - With an HTTPS connection PWAs prevent snooping and ensure secure content

Discoverable - PWAs are identifiable as an "application" thanks to W3C manifest and service worker registration scope, allowing search engines to find the app and the related content - with native apps from the app stores this was not possible

Re-engageable - With features like push notifications and background information exchange the PWAs allow a new dynamic interaction within the web environment

Installable - PWAs can be added to the home screen as an app once a user decides to stick to the application - no redirection or download prior to use

Linkable - Easily share the application via URL and handover, to enable easy and consistent customer journeys with fewer switches and transfers

From a tech perspective the Progressive Web App is predominantly enabled by the Service Worker. But, what is a service worker? This excerpt from the Google PWA page describes it best:

“A service worker is a script that your browser runs in the background, separate from a web page, opening the door to features that don't need a web page or user interaction. Today, they already include features like push notifications and background sync. In the future, service workers will support other things like periodic sync or geofencing. The core feature [...] is the ability to intercept and handle network requests, including programmatically managing a cache of responses.”

Service Worker from a tech perspective

If you are a techie and already have a deeper understanding, here are some more technical insights with an extended developer view on service worker:
It's a JavaScript Worker, so it can't access the DOM directly. Instead, a service worker can communicate with the pages it controls by responding to messages sent via the postMessage interface, and those pages can manipulate the DOM if needed.

  • Service workers provide a programmable network proxy, allowing you to control how network requests from your page are handled
  • It's terminated when not in use, and restarted when it's next needed, so you cannot rely on global state within a service worker's onfetch and onmessage handlers. If there is information that you need to persist and reuse across restarts, service workers do have access to the IndexedDB API
  • Service workers make extensive use of promises, so if you're new to promises, you should stop reading this and check out "Promises, an introduction"

Service Worker adds new possibilities to the web

So why are we so excited about Progressive Web Apps (PWA) and the “Service Worker”?

We strongly believe in a seamlessly connected world that makes processes more transparent, tasks easier to handle, information more accessible and problems more efficient to solve. Therefore we see huge potential in messaging and the intelligent and dynamic interaction between business and its stakeholders. With PWA and the capabilities of the "Service Worker", a new level of browser capabilities allows bi-directional interaction without the hassle of native apps and the downloads. At the hand of users and developers, there is a new foundation for fast and efficient information flows.

By adding the agility of notifications, app-like features and a better user experience, a gap between fenced native apps and the open garden of the web will be closed. Hence, this is not only allowing a native app-like experience but is also offering information and resource accessibility to technology platforms relying on the data from the web. This sounds abstract, but by empowering organizations to connect better and richer with users and customers in a bi-directional and dynamic way, interactions will be faster, dialogues better and the accessibility of low recurring activities more economic. Consequently, the whole process of digitization takes a large leap forward.

Furthermore, it allows a more dynamic web for better information flow and thus better search results. More processes can be digitized resulting in higher variety and more opportunities to connect previously unmatched entities and non-economic use cases. And it is likely to drive many interaction patterns from the app-sphere to the browser. Potentially deprive some of Apple’s or Google’s power through their app store.

„With PWA and the capabilities of the Service Worker, a new level of browser capabilities allows bi-directional interaction without the hassle of native apps or downloads.“
Sebastian Kellner
Sebastian is Co-Founder and CEO of Mesaic. He is an expert on anything surrounding digital processes, messaging as a tool for interactions and customer-centricity.

Mesaic Blog Update

The newest blog post. Every second week. No sales talk. Just insights.