7 min read
How to build a PWA on an existing website and compare it with a native app
A PWA (Progressive Web App) is a website that installs to the home screen and works like an app thanks to two things: a Service Worker and a manifest.json file. Users install the product straight from the browser rather than going to an app store. We look at what a PWA consists of, how to build one on an existing site and when it beats native development.

What a PWA is and how it works

A PWA is a website that behaves like an app: it installs to the home screen, launches in a separate window without an address bar, works offline and sends push notifications. From a website it takes reach and SEO indexability, and adds installation, offline mode and notifications.
Offline here does not mean everything works without a network. In an online store's catalogue, for example, the Service Worker saves the site's layout and pages chosen by the developer or already opened by the user on the device in advance: they can be browsed without the internet. Placing an order, paying for it or seeing fresh prices and stock without a network is not possible. Push notifications arrive only if the user has allowed them in response to the browser's prompt.
The technology relies on three parts: HTTPS for security, a Service Worker and a Web App Manifest. The manifest is a JSON file with the name, icon, colour and display mode.
The Service Worker is a JavaScript script that the browser runs in the background independently of the page. It intercepts network requests, manages the cache (HTML, CSS, JS, images) and is responsible for push notifications and background sync. Its scope depends on where the file is located: according to one expert article, a worker at example.com/my-pwa/sw.js controls any navigation along the my-pwa path or below.
The difference from a native app is most visible in updates. According to one expert article, every update to a native app goes through moderation in the App Store and Google Play, and this takes up to 7 days.
The idea of such sites came about on Google's initiative in 2015.
How to build a PWA on an existing site
- Check HTTPS. Without a secure protocol, the browser will not register a Service Worker, and the cache, offline mode and push notifications will be unavailable.
- Make sure images, scripts and fonts also load over HTTPS: mixed-content errors can get in the way of the Service Worker.
- Create manifest.json with the name, icons, start URL and display mode, and link it in the page's <head>.
- Write and register the Service Worker: decide what to cache and how to respond to requests without a network. To start with, a simple static caching strategy is enough. In the example from one article, the sw.js file sits in the project root, handles the install, activate and fetch events and creates a pwa-version-1 cache. The file will not start by itself: the page must register it with the line navigator.serviceWorker.register('/sw.js') in the site's JavaScript. Check: open the site, disconnect the network and refresh an already open page — it should load from the cache.
- Simplify caching and updates with ready-made libraries: Workbox, a set of tools from Google.
- Check the result: open the PWA on Android in Chrome and on iOS in Safari, look at offline mode, the icon, launching in standalone mode and push notifications. Then run Lighthouse — a Google tool built into Chrome (Developer Tools, F12 → Lighthouse tab): it assesses compliance with PWA standards, performance, accessibility and SEO, and gives recommendations.
If you do not have your own team for this kind of build, this scope of work can be given to a web development studio, and if after the PWA you want to automate other processes around the site, AI implementation in business will be useful.
PWA or a native app
PWA. This is one site and one codebase. Hosting is enough, there are no store commissions: users install the app straight from the site. According to one expert article's estimate, a PWA costs 2–10 times less than a native app with the same basic features: installation on the home screen, offline access to saved pages, push notifications. The comparison was with an app for one or two platforms; the estimate does not specify. If you need both platforms, the difference is bigger, since a native app would have to be built twice. The downside is device limitations, covered below.
Native app. This requires separate development for Android and iOS. According to one expert article's estimate, a simple app costs from 2.5 million roubles per platform, and to reach both platforms the budget has to be doubled. On the other hand, native apps do not have the restrictions on access to Bluetooth, advanced camera features and some sensors that PWAs sometimes have.
On timelines, a simple PWA launches in a couple of weeks at most if the site already exists and does not need to be created from scratch (the engine does not matter). Native versions, by contrast, take from three months for an MVP. Among the ongoing costs of a native app are the App Store and Google Play commission — up to 30% of payments for digital goods and in-app subscriptions — plus developer accounts at $99 in the App Store and $25 in Google Play annually, and support for two codebases.
| Criterion | PWA | Native app |
|---|---|---|
| Cost | 2–10 times cheaper | From 2.5 million roubles per platform |
| Launch time | A couple of weeks at most with a ready site | From three months for an MVP |
| Updates | Immediately on the site | Moderation up to 7 days |
| Ongoing costs | Hosting and one codebase, no store commissions | Commission up to 30%, accounts $99 and $25, 2 codebases |
There are reasons why native remains. Push notifications for PWAs on iPhone appeared only with iOS 16.4 and work less reliably than on Android. PWAs on iOS are suspended almost immediately after being minimised.
Access to contacts, NFC (partially), Bluetooth, biometrics and advanced camera features is limited or absent. In addition, PWAs behave differently in different browsers. If you need these capabilities, do not choose a PWA.
A PWA installs from the browser, while native costs more and takes longer
- A PWA takes indexability from a website and installation, offline mode and push notifications from an app.
- It runs on HTTPS, a Service Worker and a Web App Manifest; without HTTPS the script will not register.
- The build order: check the protocol, connect the manifest, register a Service Worker with static caching, and test on Android and iOS.
- A simple native app starts at 2.5 million roubles per platform and takes from three months for an MVP, while a simple PWA launches in a couple of weeks at most if the site already exists.
- If Bluetooth, biometrics or stable background operation on iPhone matter, a PWA is not the best option.
If you want to understand where artificial intelligence can help in your processes, QIO can help with AI implementation in business and with estimating the scope of work.
Questions and answers
What does a PWA need in order to work?
A PWA relies on HTTPS, a Service Worker and a Web App Manifest. The manifest sets the name, icons, start URL and display mode, while the Service Worker manages the cache and network requests.
Can a PWA be added to an existing site?
Yes, if the site runs over HTTPS. Connect the manifest, register the Service Worker and set up caching; a simple PWA can be launched in a couple of weeks at most if the site already exists and does not need to be created from scratch.
How much does PWA development cost compared with a native app?
According to one expert article’s estimate, a PWA costs 2–10 times less. A simple native app costs from 2.5 million roubles per platform; to launch on Android and iOS the budget has to be doubled.
When is a PWA not suitable for an app?
Do not choose a PWA if the app needs Bluetooth, biometrics, advanced camera features or access to contacts and NFC. These capabilities are limited or absent in PWAs, and access to NFC may be partial.
Does a PWA keep working in the background on iPhone?
On iOS, PWAs are suspended almost immediately after being minimised. If the app needs stable background operation, a PWA is not suitable.
Follow the journal
New pieces on websites, SEO and AI come out in the QIO journal. Follow in Google, by RSS or in Telegram to get them first.


