This site contains affiliate links — we may earn a commission if you sign up through them. Details

How to Build and Configure a Progressive Web App with Web App Manifest

How to Build and Configure a Progressive Web App with Web App Manifest

A Progressive Web App (PWA) is a technology that brings native app-like experiences to websites. Users can install your website on their home screen and use it offline, all without an app store. This guide covers how to build a PWA using Web App Manifest, a JSON file that tells browsers essential information about your web app.

What is a Progressive Web App and Why It Matters

A Progressive Web App combines web technologies like Service Workers and Web App Manifest to deliver native app-like experiences. PWAs can be installed on home screens, work offline, load instantly, and send push notifications—all without app store distribution. They're especially valuable for reaching users on budget devices and in areas with unreliable internet.

Understanding the Web App Manifest File

The Web App Manifest is a JSON file containing metadata about your web app—name, description, icons, theme colors, and display mode. Browsers read this file to install your PWA correctly. Place manifest.json in your site root and link it in every HTML page's with . This single file tells the browser everything needed to display your app properly when installed.

Essential fields include: name (full app name), short_name (≤12 characters for icon labels), icons (array with sizes and MIME types), start_url (entry page), display ("standalone" for full screen or "browser" for tab), background_color (splash screen color), and theme_color (system UI color). The short_name must be concise because it displays beneath your icon on the home screen. Modern browsers handle most fields, but older ones may require additional properties.

App Icons: Sizes and Formats Needed

Your PWA needs multiple icon sizes to display correctly across devices. Minimum sizes: 192×192 px (home screen) and 512×512 px (installation splash screen). Additional sizes like 144×144 or 256×256 px help on specific devices. Use PNG or WebP with a transparent background so the operating system can apply its own background color. Include each icon in the manifest's icons array with both sizes and purpose properties (e.g., "any" for general use or "maskable" for adaptive icons on Android).

Service Workers Explained (Offline Caching Basics)

A Service Worker is a JavaScript file running in the background, even when your web page is closed. Its primary role is to cache resources (HTML, CSS, images, JavaScript) so your PWA works offline. Service Workers also handle push notifications and background sync. You don't need a complex Service Worker—caching your home page and critical static assets is a solid start. Register it in your HTML with a simple JavaScript snippet that calls navigator.serviceWorker.register(). The browser manages its lifecycle automatically.

RecommendedAsiaGB.com — Web Hosting & VPS we recommend. Servers in Thailand & Singapore, SSD storage, DirectAdmin control panel, 24/7 Thai-language support, 99% uptime.

Based in Thailand, ideal for Thai websites and businesses.

Visit AsiaGB →

Installability Criteria: Making "Add to Home Screen" Appear

Browsers show an install prompt when your PWA meets specific criteria: valid manifest.json with required fields, HTTPS on all pages, registered Service Worker, icon at least 192×192 px, and sufficient user engagement (typically 30+ seconds on-site). Chrome, Edge, and Samsung Internet fully support PWA installation prompts. iOS Safari has limitations but allows home screen shortcuts. When all criteria are met, many browsers automatically show the install prompt, though you can trigger a custom prompt using the beforeinstallprompt event.

Testing Your PWA with Lighthouse

Google Lighthouse is a free audit tool built into Chrome DevTools that validates PWA compliance. Open DevTools, go to the Lighthouse tab, select "PWA," and click "Analyze page load." Lighthouse scores your app across Performance, Accessibility, Best Practices, SEO, and PWA compliance. The report flags missing icons, unregistered Service Workers, invalid manifests, and other issues. Run audits regularly during development to catch problems early. Fixing issues identified by Lighthouse typically results in better overall web performance and user experience.

PWA vs. Native App: Pros, Cons, and When to Use Each

PWAs and native apps each have strengths. PWAs offer instant access without app store distribution, automatic updates, and lower storage requirements. Native apps provide deeper OS integration like GPS, microphone, and hardware sensors. PWAs suit content-driven apps (news, blogs, productivity tools), while native apps excel for graphics-intensive games and apps requiring direct hardware access. Many companies launch PWAs first to reach users broadly, then develop native apps if specialized features demand it.

Common Manifest and PWA Setup Mistakes

Frequent issues include: missing in HTML, incorrect icon sizes or formats, JSON syntax errors in manifest.json, Service Worker registration failures, and non-HTTPS sites (PWAs require encryption). Another mistake is forgetting to set start_url, which can cause the app to open to the wrong page. Mismatched colors between background_color and icons can make the splash screen look broken. Debugging tip: Open Chrome DevTools, go to the Application tab, select your site, and inspect the Manifest section to spot problems immediately.

Frequently Asked Questions

Do I need a Service Worker to call my site a PWA?

Technically, a PWA requires manifest.json at minimum. However, Service Workers are essential for offline functionality and performance benefits that define the PWA experience. Without a Service Worker, your installable web app is just a web app with an icon—not a true PWA.

Does a PWA replace the need for a native app?

For content-heavy apps, yes. But apps requiring GPS, microphone, or graphics-intensive processing still benefit from native development. Many companies use PWAs to reach a broad audience first, then invest in native apps for specialized features.

Is HTTPS required for a PWA?

Yes, absolutely. Service Workers only register on HTTPS connections for security reasons. HTTP sites cannot have a PWA. If you're considering PWA features, securing your site with HTTPS is non-negotiable.

Which browsers support PWA installation?

Chrome, Edge, Samsung Internet, and Opera have full PWA installation support. Firefox recognizes the manifest but lacks a native install prompt. Safari on iOS allows home screen shortcuts but not true PWA installation. Ensure fallbacks for users on unsupported browsers.

Does having a PWA improve SEO?

PWAs don't directly boost search rankings, but indirectly help. Faster sites, lower bounce rates, and better user engagement—hallmarks of well-built PWAs—are signals that search engines consider. Strong performance and offline capability can lead to higher user retention, which supports SEO.