Book a free call

How to Build a Progressive Web App with Ionic

Ionic lets you build a progressive web app from one codebase that installs like an app. Learn the setup, service worker and install flow that turn a site into a PWA.

Hertiv engineering teamReviewed by a senior engineer
8 min read
How to Build a Progressive Web App with Ionic
On this page

Short answer

An Ionic progressive web app is a web application built with the Ionic framework that behaves like a native app: it installs on a home screen, works offline and opens full-screen. You build it once with web technologies, then ship it as a website that users can install without an app store.

What is an Ionic progressive web app?

An Ionic progressive web app is a web app built with Ionic that uses progressive web app features: a service worker for offline use, a manifest file for installation, and an app-like shell that opens without browser chrome. It runs in the browser, but it can be installed on a phone or desktop and launched from an icon.

Ionic itself is a framework for building cross-platform apps from web code. It provides ready-made interface components, such as navigation bars, lists, cards and modals, that adapt their look to the platform. The same codebase can target the web, iOS and Android, but a progressive web app needs only the web target. It is often compared with other cross-platform options; see Ionic vs Flutter for the trade-offs.

The combination suits teams that want app-like behaviour without app store review cycles. You deploy to a web server, users visit a link, and the browser offers to install the app. Updates ship the same way as any website: you deploy, and the next visit picks up the new version.

What does Ionic add to a PWA?

Ionic adds a component library, routing, and tooling to a progressive web app, so the team spends less time on interface plumbing and more on the product. A plain web app can be a PWA, but Ionic gives it the structure and the app-like feel out of the box.

Ionic pieceWhat it doesWhy it matters for a PWA
UI componentsButtons, lists, tabs, modalsApp-like interface without custom CSS
RouterPage navigation and deep linksEach screen has a shareable URL
CapacitorNative features on device buildsSame code can later ship as a native app
CLI and buildScaffolding, serving, buildingFast setup and repeatable builds

The component library is the biggest gain. Ionic components follow platform conventions, so a list scrolls and bounces the way phone users expect, and a modal slides in the way they expect. That polish is hard to build from scratch and easy to get wrong. The same component-first thinking applies to other frameworks; for example, building PWAs with React follows a similar pattern.

Capacitor is worth noting even for a web-only PWA. It is the bridge Ionic uses for native features, and keeping the code Capacitor-ready means the same project can later ship as a native app if the team decides it needs one. For a pure PWA you can ignore it, but do not write code that blocks it.

What do you need before you start?

You need a small set of tools before you start, and the setup is quick. Ionic builds on standard web tooling, so most of the pieces are things a web developer already has.

First, you need Node.js and a package manager, because the Ionic CLI and the project dependencies install through them. Next, you need the Ionic CLI itself, which scaffolds the project, serves it during development and builds the production output. You also need a code editor and a modern browser with developer tools for testing the service worker and the install prompt.

On the knowledge side, you need the web basics: HTML, CSS and JavaScript or TypeScript. Ionic works with Angular, React and Vue, so pick the framework your team already knows rather than learning a new one for this project. The PWA parts, the manifest and the service worker, are the same in every case.

Finally, you need a hosting plan that serves the app over HTTPS. Service workers only run on secure origins, so a plain HTTP site cannot be a PWA. Any host that supports HTTPS and static files will do, and the manifest and icons must be reachable from the same origin. If the PWA basics are new to you, start with what a progressive web app is.

How do you build an Ionic PWA step by step?

You build an Ionic PWA by scaffolding the project, adding the screens, wiring the PWA features, and testing the install flow in a real browser. The steps below follow the order that causes the least rework.

  1. Scaffold the project. Create a new Ionic app with the framework your team knows and pick a starter layout.
  2. Build the screens. Add pages for the core flows first, using Ionic components for navigation, lists and forms.
  3. Add routing. Give each screen a route so deep links work and the back button behaves correctly.
  4. Add the manifest. Write the web app manifest with the app name, icons, colours and display mode.
  5. Add the service worker. Set up caching for the app shell and the data the app needs offline.
  6. Test the install flow. Serve the production build over HTTPS and check the browser install prompt.
  7. Test offline. Load the app, cut the network, reload, and confirm the core screens still work.
  8. Deploy and monitor. Ship the build, then watch for service worker update problems and failed installs.

Build the screens before the PWA plumbing. It is tempting to start with the service worker, but caching rules depend on what the app actually loads, and that is only clear once the screens exist. Get the product working as a website first, then make it installable and offline-capable.

How do service workers and caching work in Ionic?

Service workers and caching work in Ionic the same way they work in any progressive web app: a script runs in the background, intercepts network requests, and serves cached responses when the network is slow or absent. Ionic projects usually generate the service worker from a configuration file rather than writing it by hand. If the project later needs native features, a mobile app development partner can help wrap it with Capacitor.

The key decision is what to cache and how. The app shell, meaning the HTML, CSS and JavaScript that render the interface, is cached first, because without it the app cannot open offline at all. Images and fonts come next, and data is cached per screen, based on how fresh it needs to be.

Two caching patterns cover most cases. Cache-first suits files that rarely change, such as the app shell and icons: serve the cached copy and update it in the background. Network-first suits data that must be fresh, such as prices or messages: try the network, and fall back to the cache only when the network fails.

Versioning is the part teams get wrong most often. When you deploy a new build, the service worker must pick up the new files, and users must not be stuck on an old version. Test the update flow on every release, and give the app a visible way to tell the user a new version is ready.

How do you make the app installable and app-like?

You make the app installable and app-like with a manifest file, the right icons, and a few design choices that remove the feeling of a website in a browser tab. Installation is what turns a visited site into an app on the home screen.

The manifest is a small JSON file that tells the browser the app name, the short name for the home screen, the start URL, the display mode and the theme colour. Set the display mode to standalone so the app opens without browser chrome, and supply icons in the sizes the platforms expect, including a maskable icon that fills the full icon area.

Beyond the manifest, the app needs to feel like an app. Navigation should use Ionic patterns, pages should load fast from the cache, and the app should handle the back button the way users expect. Avoid links that open the browser, and keep external content inside the app shell where possible.

Finally, ask for installation at the right moment. The browser shows its own install prompt, but the best results come from waiting until the user has done something useful, then offering installation in context. Asking on the first visit, before the user has seen any value, is the fastest way to be ignored.

Example (hypothetical): a cafe ordering app

Example (hypothetical): a small cafe wants an ordering app but does not want to pay for app store listings. The team builds an Ionic PWA with a menu, a cart and a pickup time picker.

The cafe website gets 1,000 visits a week. After the PWA launches, 200 of those visitors install it, which is 1 in 5. Of the 200 installs, 120 people place an order in the first month, so the install-to-order rate is 60 in 100. Each order averages 12 in the local currency, so those 120 orders bring in 1,440.

The service worker caches the menu and the app shell, so a regular customer can open the app on the train and browse the menu without a connection. Orders still need a connection to send, and the app queues the order and sends it when the network returns. The team spends nothing on store fees, and updates reach every user on the next visit.

What are the common mistakes?

The most common mistakes in Ionic PWA projects are treating the PWA as an afterthought, caching the wrong things, and never testing the install flow. Each one shows up only after launch, when users are already affected.

  • Bolting the PWA on at the end. Manifest, icons and caching need design decisions, not a last-minute checklist.
  • Caching everything the same way. Fresh data cached like static files goes stale, and static files fetched like fresh data load slowly.
  • No HTTPS in testing. Service workers do not run on plain HTTP, so a test server without HTTPS hides every PWA bug.
  • Forgetting the update flow. Users stuck on an old service worker see old screens and old bugs after every release.
  • Asking for install too early. A prompt on the first visit, before any value is shown, is usually dismissed.
  • Ignoring the back button. Broken back navigation is the fastest way to make an app feel like a broken website.

Key takeaways

  • An Ionic PWA is a web app with a manifest, a service worker and an app-like shell, built from one codebase
  • Ionic components and routing give the app its native feel; the PWA features give it installation and offline use
  • Cache the app shell first, then images, then data, and use network-first caching for anything that must stay fresh
  • Build the screens first as a website, then add the manifest and service worker once you know what the app loads
  • Test install, offline use and updates on a real phone over HTTPS before every release

Frequently asked questions

Do I need an app store to publish an Ionic PWA?

No. A progressive web app is published by deploying it to a web server over HTTPS, and users install it from the browser. There is no store review and no store fee. The trade-off is discoverability: users find the app through your website and links, not through store search, so you need to drive traffic to it yourself.

Is Ionic free to use?

Yes, Ionic is open source and free to use for building apps. You pay only for your own hosting and any third-party services you add, such as push notification providers or analytics. Some teams also pay for Ionic's commercial services, but they are optional and the framework itself costs nothing.

What is the difference between Ionic and React Native?

Ionic builds apps from web code that runs in a web view, while React Native renders real native components from JavaScript. Ionic is faster to start with for web teams and ships a PWA from the same code, while React Native gives closer native performance. The right choice depends on your team's skills and the app's needs.

Can an Ionic PWA send push notifications?

Yes, on platforms that support web push, which includes Android and desktop browsers. The app asks the user for permission, then a server sends messages through the browser push service. On iOS, web push support has arrived in newer versions, but behaviour varies, so test on the versions your users actually run.

How big can an Ionic PWA be?

There is no fixed limit, but size affects install and load speed, so keep the first load small. The app shell should stay light, images should be sized for their screens, and large assets should load on demand. Measure the first load on a real device, since a PWA that opens fast on a slow connection is the whole point.

Can I turn an Ionic PWA into a native app later?

Yes, that is one of the main reasons teams pick Ionic. The same codebase can be wrapped with Capacitor to ship native iOS and Android apps, and the PWA features keep working on the web. Keep the code Capacitor-ready from the start by avoiding browser-only tricks that break in a native shell.

Found this useful? Share it.
Hertiv engineering team

Written from projects we build for clients: software products in production. Every post is reviewed by a senior engineer before publishing and updated when practice changes.

About HertivHow we work

Planning a progressive web app with Ionic? Talk to Hertiv.

A senior engineer replies within one business day. Or see our Mobile App Development service.

Book a free call

Keep reading

All posts

Tell us what you want to build

A senior engineer reads every request and replies within one business day with questions, a rough range, or a call link.

  • NDA on request before any details
  • You own all code, models and IP
  • US, UK and EU time-zone overlap

Your email app should open with your message ready to send. If it does not, write to contact@hertiv.com.

Prefer email? Write to contact@hertiv.com
Estimate costBook a call