Web Development

Turning an Existing Website Into a PWA: What Changes and What It Takes

Making an existing website installable takes a manifest and a service worker, but doing it without stale pages, confused updates or cached personal data takes more care. Here is what changes on the site and how we plan a safe retrofit.

Illustration of the same website shown on a desktop monitor, laptop and smartphone, with code and app icons around them

You have a website or web application that works, and someone has asked whether it could be installed like an app, open full screen, load instantly for returning visitors and send notifications. You do not want to rebuild it, and you are not sure what "making it a PWA" involves. The honest answer is that the first version is small, while doing it properly, without stale pages or confused users, takes more care than most tutorials suggest.

Retrofitting existing sites is a large part of our progressive web app development work. If you are still deciding whether a PWA is the right format at all, start with our comparison of progressive web apps and native apps. This article assumes you have decided, and walks through what changes in the existing site.

The Minimum: Manifest, HTTPS and a Service Worker

Three things turn a website into an installable PWA:

  • HTTPS everywhere. Service workers only run on secure origins. Most sites already have this, but mixed-content warnings and old HTTP subdomains need clearing up.
  • A web app manifest. A JSON file linked from every page that sets the name, short_name, start_url, display mode (usually standalone), theme and background colours, and icons. You need at least 192 and 512 pixel icons, plus a maskable version so Android can crop it into its icon shapes without clipping your logo.
  • A service worker. A script that sits between the page and the network and decides what to serve from cache and what to fetch. This is where nearly all the real work lives.

We also add iOS-specific touches, such as the Apple touch icon and status bar settings, because Safari still reads some of these from meta tags. Our article on PWAs on iPhone covers what iOS does and does not support.

Choosing a Caching Strategy Per Route

The biggest mistake in retrofits is treating the whole site the same way. A service worker that caches everything will happily serve yesterday's prices or someone else's basket. We map the site's URLs into groups and give each one a strategy:

  • Versioned static assets (scripts, stylesheets, fonts with a hash in the file name): cache first, since the file never changes once deployed.
  • Images: stale-while-revalidate with a size and age limit, so the cache does not grow without bound on a user's phone.
  • Content pages such as articles and product descriptions: network first with a cached fallback, so readers get the latest version when online and something useful when not.
  • Personal and transactional pages (account, basket, checkout, anything behind a login): network only. These must never be cached by the service worker.
  • API calls for live data such as stock or availability: network only or very short-lived caches, depending on the business rules.

We usually build the service worker with Workbox, either directly or through a framework plugin such as Vite PWA for Vue and Nuxt projects or Serwist for Next.js, which handle precaching, routing rules and cache expiry without hand-written cache logic. A simple offline page, shown when a page is not cached and there is no connection, is better than the browser's default error. Full offline working, with queued actions and local data, is a larger step, covered in our article on offline-first PWAs for field teams.

Updates: The Part Most Retrofits Get Wrong

A service worker changes how deployments behave. When you release a new version, returning users may keep getting the old one until every open tab is closed, because the new service worker waits for the old one to stop controlling pages. Handled badly, users see a mix of old HTML and new scripts, or report bugs you have already fixed.

  1. Never cache the service worker file itself at the server or CDN. Browsers check it for updates, and a long cache header delays every release.
  2. Decide how updates are applied. For content sites, activating the new version immediately is usually fine. For applications with forms in progress, we show a "new version available" prompt and reload only when the user agrees.
  3. Clean up old caches in the activate step, so storage does not grow with every release.
  4. Keep a kill switch. If a bad service worker ever ships, the fix is a replacement worker that clears caches and unregisters itself. Knowing how to do that before launch avoids a stressful afternoon later.

What Else Changes on the Site

  • Analytics. Installed users open the start_url, so add a parameter to it to tell app launches apart from browser visits, and decide how to record actions taken offline.
  • Navigation. In standalone mode there is no browser back button or address bar. Pages that relied on them, such as a payment return page with no link home, need proper in-app navigation.
  • External links and sign-in. Links to other domains open in a browser view, and single sign-on or payment redirects must return the user to the app cleanly. These flows deserve testing on real devices.
  • Install prompts. Chromium browsers fire a beforeinstallprompt event you can use to show your own install button at a sensible moment. Safari has no equivalent, so iPhone users need a short instruction to use Share and then Add to Home Screen.
  • Push notifications use the Web Push standard with VAPID keys and a server that stores subscriptions. Ask for permission after the user has done something that makes notifications useful, never on the first page load. On iPhone, push only works once the PWA has been added to the home screen.

Framework and Platform Notes

How the work is done depends on what the site is built with. Single-page applications in React, Vue or Angular are the easiest, because the build already produces hashed assets and an app shell. Server-rendered frameworks need more thought about which HTML can be cached, something we handle routinely in our Next.js development work. WordPress sites can become PWAs through a plugin for the basics, but logged-in areas, WooCommerce baskets and caching plugins all interact with the service worker, so we review the rules rather than accepting the defaults. Faster repeat visits also help the field metrics we track in website speed optimisation.

For testing, Chrome DevTools' Application panel shows the manifest, the service worker's state and every cache. Lighthouse no longer has a dedicated PWA score, so we check installability, offline behaviour and update handling directly, on real Android and iOS devices.

A Realistic Plan

Most retrofits follow the same path: add the manifest and icons, ship a conservative service worker that caches only static assets with an offline page, watch it in production for a release or two, then widen the caching rules and add install prompts and push where they earn their place. Wider changes, such as restructuring routes or adding offline data, fit into our broader front-end development work.

If you would like your existing site to install and behave like an app, send us the address and tell us what you want users to be able to do offline. We will tell you what the retrofit involves and where the risks are.

Frequently Asked Questions

Do we need to rebuild our website to turn it into a PWA?

Usually not. Installability needs a manifest, icons, HTTPS and a service worker, all of which can be added to an existing site. The amount of work depends on how much you want to work offline and how much personalised content the site has, since those decide how careful the caching rules need to be.

Will a service worker show users out-of-date content?

Only if the caching rules are wrong. Content pages should use a network-first strategy so users get fresh content when online, and personal or transactional pages should never be cached. Combined with a clear update process on each release, users see current content and only fall back to cached pages without a connection.

Can a PWA built from our website be listed in the app stores?

On Android, a PWA can be published to Google Play by wrapping it as a Trusted Web Activity, which requires linking the app and domain with a Digital Asset Links file. Apple's App Store does not accept plain website wrappers, so iOS listing usually means a hybrid app with genuine native features instead.

Does turning our site into a PWA help SEO?

Not directly. Search engines do not rank sites higher for being installable. The indirect benefit comes from speed: cached assets make repeat visits faster, which can improve field performance metrics. The site must still serve complete HTML to search engines, so the service worker should never be the only way content is delivered.

How We Can Help

Services Related to This Article

The work we do with the technologies discussed above — with pricing, process and real examples on each page.

  • Progressive Web App Development

    Installable, offline-capable progressive web apps with service workers, push notifications and app-like performance — no app store required.

  • Next.js Development

    Next.js websites and web apps with server-side rendering, static generation, image optimisation and route-level code splitting for top Core Web Vitals.

  • Website Speed Optimization

    Make your website load in a blink. We diagnose bottlenecks and improve Core Web Vitals for better rankings and conversions.

  • Front-End Development

    Pixel-accurate, accessible front ends built from your designs with HTML5, CSS3, JavaScript, Tailwind or Bootstrap — responsive on every device.

In Practice

Case Studies on This Topic

Projects where we put these ideas to work, each with a live demo.

  • Power Lines — Gridline Inspections
    • Progressive Web App
    • Service Workers
    • Workbox

    Progressive Web App

    Utility Inspection Field App (PWA)

    An installable, offline-first progressive web app used by inspection crews in places with no usable signal.

Keep Reading

  • Marketing website home page on a desktop monitor, with a keyboard, mouse, green mug and plants on a light wooden desk

    Astro for Marketing Websites: Fast Pages Your Team Can Still Edit

    Astro makes marketing pages fast by default, but a fast site only helps if the marketing team can change it. Here is how we pair Astro with a CMS, a block library editors can use, previews, forms and publishing that works without a developer.

  • Developer in a red beanie sketching a flowchart of boxes and arrows on a large whiteboard

    Angular Signals and Standalone Components: What They Mean for Existing Apps

    Modern Angular is built on standalone components, signals and new template syntax, but NgModule-based apps still work. Here is what has changed, what it gains an existing codebase, and the migration order we use to adopt it gradually.

  • Developer working on a laptop at a wooden desk beside a bright window, with plants and a pen pot on the table

    Upgrading From Vue 2 to Vue 3 Without Rewriting Everything

    Vue 2 reached end of life at the end of 2023, but moving to Vue 3 rarely needs a rewrite. Here is what actually breaks, why the libraries are usually the bigger job, and the staged route we use to keep the app shipping throughout.

Let’s Connect

Let’s Build Something Amazing Together

Share your project details and our experts will get back to you within one business day with the best solution — free consultation, no obligation.