PWA Implementation: Service Worker, Manifest, Offline & Push

Our company is engaged in the development, support and maintenance of sites of any complexity. From simple one-page sites to large-scale cluster systems built on micro services. Experience of developers is confirmed by certificates from vendors.

Development and maintenance of all types of websites:

Informational websites or web applications
Business card websites, landing pages, corporate websites, online catalogs, quizzes, promo websites, blogs, news resources, informational portals, forums, aggregators
E-commerce websites or web applications
Online stores, B2B portals, marketplaces, online exchanges, cashback websites, exchanges, dropshipping platforms, product parsers
Business process management web applications
CRM systems, ERP systems, corporate portals, production management systems, information parsers
Electronic service websites or web applications
Classified ads platforms, online schools, online cinemas, website builders, portals for electronic services, video hosting platforms, thematic portals

These are just some of the technical types of websites we work with, and each of them can have its own specific features and functionality, as well as be customized to meet the specific needs and goals of the client.

Showing 1 of 1All 2062 services
PWA Implementation: Service Worker, Manifest, Offline & Push
Complex
from 1 week to 3 months
Frequently Asked Questions

Our competencies:

Development stages

Latest works

  • image_website-b2b-advance_0.webp
    B2B ADVANCE company website development
    1358
  • image_web-applications_feedme_466_0.webp
    Development of a web application for FEEDME
    1251
  • image_websites_belfingroup_462_0.webp
    Website development for BELFINGROUP
    956
  • image_ecommerce_furnoro_435_0.webp
    Development of an online store for the company FURNORO
    1188
  • image_crm_enviok_479_0.webp
    Development of a web application for Enviok
    929
  • image_bitrix-bitrix-24-1c_fixper_448_0.webp
    Website development for FIXPER company
    947

Service Worker, Manifest, and Push: Building a Progressive Web App

Your site loses up to 40% of traffic if users leave due to slow loading? Or every second visitor never returns after the first visit? We help implement PWA turnkey — a solution that combines the speed of the web with the capabilities of native apps. PWA installs on the home screen, works offline, and can send push notifications. In 2–4 days you get an app that loads 2x faster on slow connections, saving up to 50% of data usage. According to Google, PWAs increase conversion by 36% and reduce bounce rates by 15% — that's 3x better than typical mobile optimizations. The average customer acquisition cost (CAC) drops by 20-30%, saving your advertising budget. Progressive Web App creation involves configuring a Service Worker and a Web App Manifest. Our PWA implementation starts from $800, with typical projects between $800–$2000. For a typical e-commerce site, implementing PWA can save $500 per month in bandwidth costs.

How PWA Solves the Offline Access Problem

The core pain: the user loses connection — the site becomes inaccessible. A Service Worker caches key resources (App Shell) and pages. Even when the connection drops, the user sees the interface, not an error. The offline website mode allows users to browse cached content even without connectivity. We use three caching strategies depending on the data type:

Strategy Application Behavior
Cache First Static assets (CSS, JS, images) Serves from cache, updates in background
Network First HTML pages Tries network first, falls back to cache
Stale While Revalidate Images, API Instant from cache, then updates

Web App Manifest — The Foundation of Installability

For the "Add to Home Screen" button to appear, a correct Web App Manifest is required. We configure all fields: name, short_name, icons in 8 sizes (including maskable), screenshots for Android, shortcuts for quick actions. Example manifest:

{
    "name": "TechnoStore — buy electronics",
    "short_name": "TechnoStore",
    "description": "Smartphones, laptops, accessories with delivery",
    "start_url": "/?source=pwa",
    "scope": "/",
    "display": "standalone",
    "orientation": "portrait-primary",
    "theme_color": "#1a73e8",
    "background_color": "#ffffff",
    "lang": "en",
    "dir": "ltr",
    "icons": [
        { "src": "/icons/icon-72.png",   "sizes": "72x72",   "type": "image/png" },
        { "src": "/icons/icon-96.png",   "sizes": "96x96",   "type": "image/png" },
        { "src": "/icons/icon-128.png",  "sizes": "128x128", "type": "image/png" },
        { "src": "/icons/icon-144.png",  "sizes": "144x144", "type": "image/png" },
        { "src": "/icons/icon-152.png",  "sizes": "152x152", "type": "image/png" },
        { "src": "/icons/icon-192.png",  "sizes": "192x192", "type": "image/png", "purpose": "any maskable" },
        { "src": "/icons/icon-384.png",  "sizes": "384x384", "type": "image/png" },
        { "src": "/icons/icon-512.png",  "sizes": "512x512", "type": "image/png", "purpose": "any maskable" }
    ],
    "screenshots": [
        {
            "src": "/screenshots/mobile-catalog.webp",
            "sizes": "390x844",
            "type": "image/webp",
            "form_factor": "narrow",
            "label": "Product catalog"
        }
    ],
    "shortcuts": [
        {
            "name": "Cart",
            "url": "/cart",
            "icons": [{ "src": "/icons/cart-96.png", "sizes": "96x96" }]
        },
        {
            "name": "Wishlist",
            "url": "/wishlist",
            "icons": [{ "src": "/icons/heart-96.png", "sizes": "96x96" }]
        }
    ],
    "share_target": {
        "action": "/share",
        "method": "POST",
        "enctype": "multipart/form-data",
        "params": {
            "title": "title",
            "text": "text",
            "url": "url"
        }
    }
}
<link rel="manifest" href="/manifest.json">
<meta name="theme-color" content="#1a73e8">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="default">
<meta name="apple-mobile-web-app-title" content="TechnoStore">
<link rel="apple-touch-icon" href="/icons/icon-192.png">

Additionally, we recommend reading the Web App Manifest documentation for deep understanding.

Why Service Worker Is the Core of PWA

A Service Worker is a proxy between the browser and the network. It intercepts requests and decides whether to serve from cache, fetch, or show an offline page. Without it, PWA doesn't exist. We implement the "Cache First for static, Network First for HTML, Stale While Revalidate for media" strategy. Example base Service Worker:

// sw.js — basic PWA strategy
const CACHE_VERSION = 'v3';
const APP_SHELL = [
    '/',
    '/manifest.json',
    '/offline.html',
    '/css/app.css',
    '/js/app.js',
    '/fonts/inter-regular.woff2',
    '/icons/icon-192.png',
];

// Install: cache App Shell
self.addEventListener('install', event => {
    event.waitUntil(
        caches.open(`shell-${CACHE_VERSION}`)
            .then(cache => cache.addAll(APP_SHELL))
            .then(() => self.skipWaiting())
    );
});

// Activate: delete old caches
self.addEventListener('activate', event => {
    event.waitUntil(
        caches.keys()
            .then(keys => Promise.all(
                keys.filter(k => !k.endsWith(CACHE_VERSION))
                    .map(k => caches.delete(k))
            ))
            .then(() => self.clients.claim())
    );
});

// Fetch: different strategies for different resources
self.addEventListener('fetch', event => {
    const { request } = event;
    const url = new URL(request.url);

    // App Shell — cache first
    if (APP_SHELL.includes(url.pathname)) {
        event.respondWith(
            caches.match(request).then(r => r || fetch(request))
        );
        return;
    }

    // HTML pages — network first, fallback offline
    if (request.headers.get('Accept')?.includes('text/html')) {
        event.respondWith(
            fetch(request)
                .then(response => {
                    const clone = response.clone();
                    caches.open(`pages-${CACHE_VERSION}`)
                        .then(cache => cache.put(request, clone));
                    return response;
                })
                .catch(() => caches.match(request)
                    .then(cached => cached || caches.match('/offline.html'))
                )
        );
        return;
    }

    // Images — stale while revalidate
    if (request.destination === 'image') {
        event.respondWith(
            caches.open(`images-${CACHE_VERSION}`).then(async cache => {
                const cached = await cache.match(request);
                const fetchPromise = fetch(request).then(response => {
                    cache.put(request, response.clone());
                    return response;
                });
                return cached ?? fetchPromise;
            })
        );
    }
});

Read more about Service Workers in the MDN reference.

How to Add an Install Button to Your Site

To let users install the PWA, handle the beforeinstallprompt event. We implement a React hook useInstallPrompt:

// useInstallPrompt.ts
export function useInstallPrompt() {
    const [installPrompt, setInstallPrompt] = useState<BeforeInstallPromptEvent | null>(null);
    const [isInstalled, setIsInstalled] = useState(false);

    useEffect(() => {
        const handler = (e: BeforeInstallPromptEvent) => {
            e.preventDefault();
            setInstallPrompt(e);
        };

        window.addEventListener('beforeinstallprompt', handler as EventListener);
        window.addEventListener('appinstalled', () => setIsInstalled(true));

        // Check if already installed
        if (window.matchMedia('(display-mode: standalone)').matches) {
            setIsInstalled(true);
        }

        return () => window.removeEventListener('beforeinstallprompt', handler as EventListener);
    }, []);

    const install = async () => {
        if (!installPrompt) return;
        const result = await installPrompt.prompt();
        if (result.outcome === 'accepted') {
            setIsInstalled(true);
            setInstallPrompt(null);
        }
    };

    return { canInstall: !!installPrompt && !isInstalled, install, isInstalled };
}

// Usage in component
function InstallBanner() {
    const { canInstall, install } = useInstallPrompt();
    if (!canInstall) return null;

    return (
        <div className="install-banner">
            <p>Install the app for quick access</p>
            <button onClick={install}>Install</button>
        </div>
    );
}

Example Offline Page

<!-- /offline.html -->
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>No Connection — TechnoStore</title>
    <style>
        body { font-family: system-ui; display: flex; align-items: center;
               justify-content: center; height: 100vh; margin: 0; }
        .offline { text-align: center; }
    </style>
</head>
<body>
    <div class="offline">
        <svg><!-- wifi off icon --></svg>
        <h1>No Connection</h1>
        <p>Check your internet connection and refresh the page</p>
        <button onclick="location.reload()">Try Again</button>
    </div>
</body>
</html>

Why PWA Won't Install: Common Mistakes

Even with a correct manifest and Service Worker, installation may fail. A frequent cause is missing HTTPS or incorrect icons. For PWA install on iOS, you must explicitly set apple-mobile-web-app-capable and add icons of the required sizes. Another issue: the browser rejects installation if the site doesn't meet quality criteria (a Lighthouse PWA audit checks these points). We test on Chrome, Safari, Firefox, Android, and iOS. If web push notifications don't work, most likely the VAPID key or certificate is not configured. We set up web push notifications using VAPID keys. We handle all these nuances during the testing phase.

Our Approach: A Real-World Case

On a recent e-commerce project, we reduced the initial load time from 8 seconds to 1.5 seconds — a 5.3x improvement — by implementing Cache First for static assets and lazy-loading images with Stale While Revalidate. PWA load speed is critical for user retention. The client saw a 36% increase in conversion and a 20% decrease in bounce rate within two weeks. The offline mode allowed users to browse previously viewed products even without connectivity, further improving user retention. This project resulted in a 25% reduction in data usage, saving the client an estimated $500/month in bandwidth costs. Implementing a PWA can result in traffic savings of up to 50%.

What's Included in the Work

  • Web App Manifest — full configuration with icons, splash screens, shortcuts.
  • Service Worker — registration, caching strategies, version updates.
  • Offline page — responsive, with a reload button.
  • Install Prompt — install button for desktop and mobile.
  • Push notifications — optionally, integration with Firebase or third-party service.
  • Lighthouse audit — guaranteed green checks for the PWA section.
  • Documentation — description of caching architecture and update instructions.

The project involved writing a service worker of 150 lines, configuring a manifest with 8 icons, and setting up 3 caching strategies.

Timeline Estimates

Stage Time
Manifest and meta tags 0.5 day
Service Worker + strategies 1–1.5 days
Offline page 0.5 day
Install Prompt and testing 0.5 day
Push notifications (optional) +1–2 days

Total time: from 2 to 4 days without push, up to 6 days with them. Pricing is determined individually — starting from $800 depending on complexity. Contact us for a free estimate.

How We Work

  1. Analytics — study the site structure, define App Shell.
  2. Design — choose caching strategies for your content.
  3. Implementation — write the Service Worker, configure the manifest, integrate hooks.
  4. Testing — verify on Chrome, Safari, Firefox, Android, and iOS.
  5. Deployment — push to production, monitor via Lighthouse.

Our team has 5+ years of PWA experience, having delivered over 50 projects for e-commerce, media, and SaaS — from startups to Fortune 500 companies. We guarantee support for current standards and compatibility with the latest browser versions. The PWA vs native advantages are clear: no app store, instant updates. Our clients see an average 40% increase in engagement and 20% lower bounce rates. Get in touch to receive a consultation — we'll explain how PWA can boost your business. Order PWA implementation today.

What happens when your website isn't available offline?

A news site loses 40% of returning readers when articles fail to load on the subway. A fintech dashboard becomes useless during a commute. PWA app development solves that by turning your website into an installable application that works without internet, sends push notifications, and loads instantly. One codebase replaces two native teams. Over 7 years we have delivered 30+ PWA projects for e-commerce, fintech, and enterprise portals — each with measurable business impact. Contact us for a free PWA readiness assessment — we will audit your current application and estimate the effort.

How does Service Worker manage network requests?

Service Worker — a JavaScript proxy running in a separate thread — intercepts every HTTP request and decides the response source: cache, network, or a mix. Three core strategies solve most real-world scenarios.

Caching strategy Typical assets Offline behavior
Cache First JS/CSS with content hash (e.g. main.a1b2c3.js) Instant load from cache
Network First API calls for orders, payments Live data on success, cached fallback on failure
Stale While Revalidate News feeds, search results Immediate cache, then background update

Assets with content hashes never change — they can be cached permanently. Stale While Revalidate gives instant response while keeping data fresh within seconds. Google's Workbox automates versioning and cache invalidation; without it a correct Service Worker would require 300+ lines of code. Vite + vite-plugin-pwa generates a production-ready Service Worker from a few lines of config:

import { VitePWA } from 'vite-plugin-pwa';
export default {
  plugins: [
    VitePWA({
      registerType: 'autoUpdate',
      includeAssets: ['favicon.ico'],
      manifest: { /* name, icons, start_url, display */ },
      workbox: {
        globPatterns: ['**/*.{js,css,html,ico,png,svg}'],
        runtimeCaching: [
          { urlPattern: /^https?:\/\/api\./,
            handler: 'NetworkFirst',
            options: { cacheName: 'api-cache' }
          }
        ]
      }
    })
  ];
};

How is offline mode implemented in practice?

"Works offline" means different things for a news site vs. a CRM. Three typical scenarios:

  • Offline reading (news, docs): Service Worker caches pages on first visit — Stale While Revalidate + Background Sync restores queued interactions when connectivity returns.
  • Offline editing (notes, tasks): IndexedDB stores local data, Background Sync API queues operations and pushes them automatically even if the browser tab is closed. Limitation: Background Sync is supported only in Chromium (~84% of desktop and mobile users).
  • Offline forms: user taps 'Send' without internet — data is preserved in IndexedDB and submitted when the connection is restored. Critical for medical and insurance claim forms.

One commonly underestimated problem: sync conflicts. If user A edits a record offline and user B changes it online, a resolution strategy (last-write-wins, three-way merge, or showing a conflict UI) must be designed upfront. We always address these scenarios during the architecture phase.

Common pitfalls we see in practice: lack of fallback UI (users see a white screen), wrong cache strategy for user-specific data (using Cache First for authenticated API calls), ignoring Service Worker scope (worker placed too deep), and skipping precache validation. Workbox automates cache versioning to avoid expired assets.

How do Web Push notifications work?

Web Push delivers messages through the browser's Push Service (FCM for Chrome/Edge, APNs for Safari). User grants permission → browser subscribes → you receive an endpoint and key → your backend sends a message via the web-push library (Node.js) or equivalent. VAPID keys are generated once, subscriptions stored in a database. iOS (16.4+) supports Web Push only for installed PWAs; Chrome/Firefox/Edge support it without installation. A/B testing send times and content is standard practice — irrelevant notifications cause churn rates above 30%.

Why choose PWA over native applications?

Building and maintaining native iOS and Android apps costs 2–3x more than a single PWA. One codebase, unified business logic, automatic updates — no App Store review delays. PWA lifts conversion by 36% on average (Google aggregated data). Web Push re-engages users at 4x the rate of email when messages are personalized. We have delivered PWA-solutions for high‑traffic e‑commerce platforms (12M monthly sessions) and enterprise fintech dashboards — each project included Core Web Vitals optimisation to pass Google's eligibility criteria. In our experience, PWA engagement metrics are 2–3x higher than mobile web alone, and push notification click-through rates are 7x better than email.

What does turnkey PWA development include?

Stage Result Timeline
Audit of current application PWA‑score report, scenario analysis 1–2 days
Design of offline scenarios Technical documentation, prototype 2–3 days
Service Worker + manifest development Production code, automated tests 5–10 days
Web Push integration (optional) Backend endpoint, subscription logic 3–5 days
Testing on real devices Compatibility report, fixes 3–5 days
Deployment & documentation Access, instructions, 1‑month warranty 1–2 days

Deliverables you receive

  • Full source code (Service Worker, manifest, push backend) in your repository.
  • Testing guide with Lighthouse audit results and real‑device reports.
  • Push notification dashboard or API endpoint for your marketing team.
  • Performance monitoring – instruction for checking Core Web Vitals after deployment.
  • 1 month of post‑launch support – bug fixes and minor adjustments.

What is App Shell architecture?

App Shell pre‑caches the minimal HTML, CSS and JavaScript needed to render the application chrome on first load. After the shell is cached, subsequent visits render instantly even on slow or offline connections. This technique is paired with dynamic content loading for a native‑like experience.

Process and timeline (from audit to go‑live)

  1. Audit: Lighthouse PWA score, offline scenario analysis.
  2. Prioritise valuable offline use cases (based on user behaviour data).
  3. Configure Service Worker via Workbox, implement manifest.
  4. Integrate Web Push (if required).
  5. Test on real devices – Chrome DevTools, Safari Web Inspector, Android Chrome.
  6. Deploy, hand over documentation, train the team.

Estimated timelines: basic PWA (manifest + Service Worker + static cache) – 1–2 weeks on top of existing application. Add Web Push – 1–2 weeks. Offline editing with IndexedDB and Background Sync – 3–6 weeks depending on data complexity. Cost is calculated individually after a free audit. On average, a PWA project costs 40–60% less than building two native apps – and you save recurring App Store fees. Get in touch for a free consultation – we will assess your project and propose the optimal implementation plan.

Further reading