No history yet

Introduction to PWAs

The App That Isn't an App

You’ve used countless websites and downloaded plenty of apps. Websites are easy to find and share, but often need an internet connection. Native apps, downloaded from an app store, work offline and can send you notifications, but they take up space and require manual updates.

Progressive Web Apps (PWAs) offer a hybrid solution. They are websites that look and feel like native mobile apps. You can access them through a browser, but also add them to your home screen, use them offline, and get push notifications, all without visiting an app store.

A Progressive Web App or simply PWA is a web application that makes use of modern web/browser features to provide a native-app-like experience to users.

Think of a PWA as a website that has been given superpowers. It’s built with the same technologies as websites (HTML, CSS, JavaScript) but includes modern features that were once exclusive to native apps. The goal is to create an experience that is reliable, fast, and engaging.

The Best of Both Worlds

PWAs combine the reach of the web with the features of native apps. This blend provides some significant advantages over both traditional websites and native applications.

FeatureWebsiteNative AppPWA
InstallationNot requiredRequired (App Store)Optional (from browser)
DiscoverabilityHigh (Search engines)Low (App Store)High (Search engines)
Offline AccessNoYesYes
UpdatesAutomaticManualAutomatic
PlatformCross-browserPlatform-specificCross-platform

One key benefit is accessibility. Users can find a PWA through a simple web search and start using it immediately. If they like it, they can add it to their home screen with a single tap, skipping the friction of an app store search and installation.

Because they run in a browser, PWAs are also instantly updated. Users always have the latest version without needing to download anything new. This single codebase works across different devices and platforms, saving development time and resources.

How PWAs Work

The magic of PWAs comes from a few core technologies working together. While the underlying code is standard web tech, three key components elevate a website to a PWA.

  1. Service Worker: This is a script that the browser runs in the background, separate from the web page. It acts like a proxy between the network and the application. The service worker is what enables offline functionality by intercepting network requests and serving responses from a local cache. It's also the backbone for features like push notifications.

  2. Web App Manifest: This is a simple JSON file that tells the browser about your PWA and how it should behave when 'installed' on the user's device. It defines the app's name, icons, splash screen, and other details that create a native-like appearance.

  3. HTTPS: PWAs must be served over a secure connection. HTTPS prevents snooping and ensures that the content hasn't been tampered with. It's a requirement for service workers to run, as they can intercept and modify network requests.

By combining these components, developers can create web applications that are discoverable, installable, and re-engageable, offering a seamless experience on any device.

Now that you understand the what, why, and how of PWAs, let's test your knowledge.

Quiz Questions 1/5

What is a key advantage of Progressive Web Apps (PWAs) over native mobile apps?

Quiz Questions 2/5

Which PWA component is responsible for enabling offline functionality and push notifications?

With this foundation, you're ready to explore how specific features like push notifications are implemented.