Skip to content
Web Development16 min read

Ecommerce PWA Development: How to Build a Progressive Web App Store

How to build an ecommerce PWA: architecture, service worker caching for catalogs and carts, install, offline states, checkout, browser support and limits.

01

Quick answer

An ecommerce PWA is your online store with three additions: a web app manifest so it can be installed, a service worker that caches assets and some catalog content, and app-like navigation and states. Build it on server-rendered pages so it stays indexable and fast on first visit. Cache static assets aggressively, cache catalog content with revalidation, and never serve cached prices, stock, carts or checkout. Treat install and push as optional extras, because browser support varies, especially on iOS.

02

Where This Fits

This article covers the engineering of PWAs for online stores. For what PWAs are in general, see PWA development. For the shopping experience of an ecommerce PWA, see ecommerce PWA UX. For the decision between a PWA and a native app, see PWA vs native app for ecommerce.

03

What Makes an Ecommerce Store a PWA

ComponentWhat it doesEcommerce consideration
HTTPSRequired for service workers and most PWA APIsAlready standard for any store
Web app manifestName, icons, start URL, display mode, theme colourStart URL should open a useful screen, such as home or account
Service workerIntercepts requests, manages caches, handles pushMust never cache dynamic commerce data unsafely
App shell and navigationPersistent header, navigation and fast transitionsCart count and account state must stay accurate
Offline and error statesWhat shows without a connectionClear messaging; checkout disabled offline
04

PWA Architecture for a Store

The safest architecture keeps the store a server-rendered website and adds PWA capabilities on top. Pages arrive as HTML that search engines and first-time visitors can use immediately. The service worker then speeds up repeat visits and navigation.

Behind the storefront sit the same commerce APIs used by any headless build: catalog and search, cart, pricing, customer accounts and checkout. The PWA layer should not change where business rules live. See headless ecommerce architecture and mobile ecommerce development.

05

Service Worker Caching Strategy

Caching is where ecommerce PWAs most often go wrong. A cached product page showing yesterday's price, or a cached cart showing items the customer removed, does more harm than a slow page. Assign a strategy to each request type explicitly.

Request typeStrategyNotes
Versioned scripts, styles, fonts, iconsCache firstVersion file names so updates replace old files
Product and category imagesCache first with size limits, or stale while revalidateCap cache size and expire old entries
Catalog HTML or API responsesNetwork first or stale while revalidateShort lifetimes; always refresh price and availability
Search resultsNetwork firstOptionally cache recent searches for offline display
Cart, customer, pricing, stockNetwork onlyNever serve from cache
Checkout pages and paymentNetwork only, outside service worker control where possibleHosted checkouts should not be intercepted
Analytics and trackingNetwork, optionally queuedRespect consent; do not replay sensitive data

Key takeaway

If a product page is cached, render price, stock and delivery estimates from a fresh request after load, or show the page as offline. Never let a cached price reach the cart.

06

Updating the Service Worker Safely

Service workers persist between visits, so a broken worker can keep serving a broken store. Plan updates: version caches, clean up old ones in the activate step, avoid caching HTML for long periods, and keep a tested way to unregister or bypass the worker if something goes wrong. Test the update path, not only the first install.

07

Installability

Installation lets customers open the store from the Home Screen or desktop in its own window. Support differs by browser:

PlatformHow install works
Chrome, Edge and other Chromium browsersInstall from the browser menu; sites can show their own install button using the beforeinstallprompt event
Safari on iOS and iPadOSShare, then Add to Home Screen; from iOS 26 sites added this way open as web apps by default
Safari on macOSFile, then Add to Dock
FirefoxLimited web app support on Windows from Firefox 143; not the full PWA feature set

Worth noting

Installation is optional. Most shoppers will use the store in a browser tab, so every feature must work without installing.

08

Offline Behaviour

Offline support in ecommerce means graceful degradation, not offline shopping. Useful offline behaviour includes showing recently viewed products and saved items, keeping the cart visible as last known, showing order history if cached, and a clear banner explaining that prices and checkout need a connection.

Avoid queueing purchases or cart changes to replay later without the customer's knowledge. Background Sync, which could replay requests later, is supported in Chromium browsers but not in Safari or Firefox, so it cannot be relied on for core flows.

09

Ecommerce APIs and Data

PWAs rely on fast APIs for navigation after the first page. Shape responses around screens, keep payloads small, and separate cacheable catalog data from personal and live data. On Shopify, headless PWAs typically use the Storefront API for catalog and cart, and the Customer Account API for signed-in customers. See ecommerce API integration and headless Shopify.

Thinking about a PWA storefront?

ZSpace Labs can assess whether PWA features would help your store and design a caching plan that keeps prices, stock and checkout accurate.

Start a Project
10

Authentication

PWAs share cookies and storage with the browser that installed them, but an installed web app can have its own storage context on some platforms, so customers may need to sign in again after installing. Use your platform's customer account system with OAuth and secure, HTTP-only cookies where possible, keep sessions reasonably long, and test sign-in flows inside the installed app window, including redirects to identity providers.

11

Checkout in a PWA

Most platforms run checkout on their own hosted pages for security and compliance. In a PWA, hand off to that checkout with the cart's checkout URL and make sure the service worker does not intercept or cache it. Test the hand-off inside an installed PWA window, since payment redirects and wallets can behave differently there.

Offer wallets for speed: the Payment Request API is available in major browsers, and Apple Pay on the web works in Safari and, from iOS 18, in other browsers through a code scanned on an iPhone. Platform checkouts usually handle wallet integration for you. See mobile ecommerce checkout.

12

Push Notifications

Web push lets a PWA send order updates, back-in-stock and price-drop alerts. Support varies: Chromium browsers and Firefox support it; on iOS and iPadOS 16.4 or later, push works only for web apps added to the Home Screen, after a user gesture triggers the permission request. Ask for permission at a relevant moment, such as after a customer requests a restock alert, never on first page load. See push notifications.

13

Performance and SEO

A PWA does not make a slow site fast on its own. The first visit still depends on server rendering, page weight and images. Service worker caching speeds up repeat visits and navigation. Keep the store crawlable with server-rendered HTML, real URLs for every product and category, and normal canonical and structured data. Avoid client-side-only rendering for catalog pages. See website performance optimization.

14

Browser Support Summary

Check current support before relying on any capability. As of writing:

CapabilityChromium browsersSafari (iOS/macOS)Firefox
Service workers and Cache APIYesYesYes
Web app manifestYesYesPartial
Custom install prompt (beforeinstallprompt)YesNoNo
Web pushYesYes; on iOS only for Home Screen web appsYes
Background SyncYesNoNo
Payment Request APIYesYesNot by default
15

Limitations

  • No app store presence unless you also package the PWA for stores
  • iOS push only after Home Screen installation
  • Some device APIs unavailable or inconsistent across browsers
  • Storage can be cleared by the browser under pressure
  • Service worker bugs persist until updated
  • Install prompts and behaviour differ by platform, which complicates UX
16

Testing an Ecommerce PWA

  • First visit, repeat visit and installed-app visit on iOS and Android
  • Offline and flaky network modes
  • Price or stock changed after a page was cached
  • Service worker update from an older version
  • Sign-in, sign-out and session expiry in the installed window
  • Checkout hand-off and wallets inside the installed window
  • Push permission, delivery and opt-out
  • Lighthouse and real-user Core Web Vitals
17

Worked Example

An illustrative scenario, not a client case: a fashion store adds a service worker that caches product pages for fast repeat visits. During testing, a price change made in the admin does not appear for returning visitors because the HTML is cached for a day. The team switches catalog HTML to network first with a short fallback, loads price and stock from a fresh API call after render, and adds a test that changes a price and checks it updates for a returning visitor.

18

Common Mistakes

  • Caching HTML that contains prices or stock for long periods
  • Letting the service worker intercept hosted checkout
  • Showing an install prompt on the first visit
  • Client-side rendering that hides catalog content from crawlers
  • Relying on Background Sync for important actions
  • No plan to roll back a faulty service worker

Ready to build a faster mobile store?

Talk to ZSpace Labs about PWA and headless storefront development, Shopify headless builds and app-like UX design.

Start a Project
19

Conclusion

An ecommerce PWA is a well-built website with careful additions: a manifest, a service worker with explicit caching rules, graceful offline states, optional install and push. Keep live commerce data out of caches and checkout out of the service worker's reach. Next: ecommerce PWA UX and ecommerce app performance.

FAQ

Common questions.

An online store built as a progressive web app: a normal website that also has a web app manifest, a service worker for caching and offline behaviour, and can be installed to the Home Screen or desktop. It runs in the browser and stays indexable by search engines.

Not necessarily. Many PWAs are built as headless storefronts, but you can add a manifest and a carefully scoped service worker to some theme-based stores. The platform must allow you to serve the service worker from your own domain and scope.

Static assets such as scripts, styles, fonts and icons; optionally recently viewed catalog pages and images with revalidation. It should not serve cached cart contents, prices, stock or checkout pages, which must come from the network.

No. Payment, tax, stock and price checks need a live connection. A good PWA shows an offline message, keeps the cart safe, and lets customers resume when the connection returns.

Yes. Safari supports service workers and web app manifests, and from iOS 26 any site added to the Home Screen opens as a web app by default. Some capabilities, such as Background Sync and the beforeinstallprompt event, are not available in Safari.

Yes, with limits. Chromium browsers and Firefox support web push. On iOS and iPadOS (16.4 and later), push works only for web apps added to the Home Screen, after the user grants permission.

Not in the same way. Chromium browsers can show an install prompt; Safari uses Add to Home Screen on iOS and Add to Dock on macOS; Firefox added limited web app support on Windows. Installation is optional; the store must work without it.

Indirectly. A PWA is still a website, so pages can be indexed normally if they are server-rendered or otherwise crawlable. The SEO benefit comes from speed and good page content, not from PWA status itself.

Typically the PWA builds the cart through the Storefront API and sends the shopper to Shopify's checkout using the cart's checkout URL. Checkout runs on Shopify, so the service worker must not intercept it.

Uneven browser support for some APIs, iOS push only after Home Screen installation, no app store presence by default, less device access than native apps, and the risk of serving stale data if caching is designed carelessly.

Get in touch

Have a project in mind?

Whether you're building a new digital product, improving an existing website, or looking to automate part of your business — let's talk.