TechBuzzPro

Progressive Web App: What It Is & How It Works

· 6 min read · Apps & Browsers

In this article
  1. Background and Origin of the Term
  2. Core Technologies That Make a PWA Work
  3. How a PWA Is Installed and Used
  4. Common Problems and Limitations
  5. How to Choose Between a PWA and a Native App
  6. Safety and Security Considerations
  7. Frequently Asked Questions

A progressive web app (PWA) is a website that behaves like a native mobile app. It loads in a browser, but you can install it on your phone or desktop, use it offline, and receive push notifications. The key difference from a regular website is that a PWA uses modern web capabilities to deliver an app-like experience without requiring a visit to an app store.

Background and Origin of the Term

The term "progressive web app" was coined in 2015 by designer Frances Berriman and Google engineer Alex Russell. They used it to describe a new class of web applications that combine the reach of the web with the capabilities of native apps. The word "progressive" refers to the idea that the app works for every user, regardless of browser choice, because it enhances progressively as the browser supports more features.

Before PWAs, developers had to choose between building a native app (for iOS or Android) or a mobile website. Native apps offered offline support and push notifications but required separate codebases and app-store approval. Websites were easy to link to but lacked app-like features. PWAs emerged as a middle ground, using standard web technologies to close that gap.

Core Technologies That Make a PWA Work

Three main technologies define a PWA:

  • HTTPS: All PWA resources must be served over a secure connection. This ensures data integrity and enables service workers.
  • Service Worker: A JavaScript file that runs in the background, separate from the web page. It intercepts network requests, caches assets, and enables offline functionality.
  • Web App Manifest: A JSON file that provides metadata about the app—name, icons, start URL, display mode—so the browser can present it as an installable app.

These three work together. The manifest tells the browser how to display the app when installed. The service worker controls caching and offline behavior. HTTPS is a prerequisite for both.

How a PWA Is Installed and Used

Installing a PWA is simpler than installing a native app. On Android, open the site in Chrome, tap the menu (three dots), and select "Add to Home screen" or "Install app." On desktop, look for the install icon in the address bar. On iOS, tap the Share button in Safari and choose "Add to Home Screen." The exact wording varies by browser and version, but the process is similar across platforms.

Once installed, the PWA appears as an icon on your home screen or desktop. It opens in a standalone window (no browser address bar) and can run full-screen. It behaves like a native app: it launches quickly, works offline, and can send push notifications if the user grants permission.

Common Problems and Limitations

PWAs are not a perfect replacement for native apps. The most common limitations include:

  • iOS Restrictions: Safari on iOS historically had limited support for push notifications and some service worker features. As of recent iOS versions, push notifications are supported, but the user must add the PWA to the home screen first.
  • Limited Access to Device Hardware: PWAs cannot access all native APIs. For example, they cannot use Bluetooth or NFC in all browsers, and background file access is restricted.
  • Battery and Performance: Poorly written service workers can drain battery or cause performance issues. Caching too much data can also cause storage problems.
  • App Store Approval: While PWAs bypass the app store, they also miss out on the discovery and trust that stores provide. Some users expect to find apps in an official store.

Despite these issues, PWAs are a solid choice for content-heavy sites, e-commerce, and news outlets where offline reading and quick loading matter.

How to Choose Between a PWA and a Native App

The decision depends on your goals and resources. Here are key factors to consider:

  • Audience: If your users are on mobile and you need to reach them without app-store friction, a PWA is ideal. If you need deep device integration (e.g., a camera app), a native app is better.
  • Budget: Building a PWA is typically cheaper because you use one codebase for all platforms. Native apps require separate development for iOS and Android.
  • Offline Needs: If your content is static (articles, product catalogs), a PWA can cache it effectively. If you need real-time data sync, native apps handle background sync better.
  • Monetization: If you rely on in-app purchases or subscriptions, native app stores offer a built-in payment system. PWAs use web payment APIs, but they may not be as streamlined.

Many companies use a hybrid approach: a PWA for the widest reach and a native app for power users.

Safety and Security Considerations

PWAs are generally safe because they run in the browser's sandbox. However, there are security points to keep in mind:

  • HTTPS is mandatory: Without HTTPS, a service worker cannot be registered. This protects against man-in-the-middle attacks.
  • Service Worker Scope: A service worker can only control pages in its scope. This limits its ability to affect other origins.
  • Update Security: Service workers update automatically, but they can be hijacked if the server is compromised. Regular security audits are recommended.
  • User Permissions: Push notifications and geolocation require user consent. A PWA cannot access these without explicit permission.

Users should be cautious when installing PWAs from unknown sources, just as they would with native apps. But because PWAs are served over HTTPS and cannot access the file system, they pose a lower risk than many native apps.

Frequently Asked Questions

Do PWAs work on iPhones?

Yes, PWAs work on iPhones, but with limitations. Safari on iOS supports service workers and the web app manifest, but some features like push notifications are only available after the user adds the PWA to the home screen. Full-screen display and offline support work, but not all APIs are available.

Can a PWA be published on the App Store or Google Play?

Yes, you can wrap a PWA in a native shell and submit it to app stores, but that defeats some of the purpose. Google Play allows PWAs to be listed directly through Trusted Web Activity. Apple's App Store does not allow PWAs directly; you would need to use a wrapper like Capacitor, which is not a pure PWA.

Do I need to write code to create a PWA?

Yes, you need to know HTML, CSS, and JavaScript. The service worker and manifest are written in JavaScript and JSON. However, there are frameworks like Workbox and tools like PWA Builder that simplify the process.

How much does it cost to build a PWA?

Costs vary widely depending on complexity. A simple content PWA can be built for a few thousand dollars, while a full-featured app with offline sync and push notifications could cost tens of thousands. Since you use one codebase, it is typically cheaper than building two native apps.

Can a PWA send push notifications?

Yes, on Android and desktop browsers, PWAs can send push notifications using the Push API and service workers. On iOS, push notifications are supported from iOS 16.4 onward, but only when the PWA is added to the home screen and the user grants permission.

Is a PWA better than a responsive website?

A responsive website adapts to screen size but still requires an internet connection and lacks app-like features. A PWA adds offline support, installability, and push notifications. If you need those features, a PWA is better; otherwise, a responsive site may be sufficient.