PWA Issues | Blue Frog Docs

PWA Issues

Troubleshooting Progressive Web App issues including service workers, manifests, and offline capabilities

Progressive Web App (PWA) Issues

Progressive Web Apps combine the best of web and native apps, offering installability, offline support, and enhanced performance. However, PWA implementations require careful attention to service workers, manifests, and caching strategies.

Why PWA Issues Matter

PWAs can significantly improve user engagement:

  • Installable - Add to home screen without app stores
  • Offline support - Continue working without network
  • Push notifications - Re-engage users
  • Fast loading - Cached assets for instant loads

When misconfigured, PWAs can cause:

  • Failed installation prompts
  • Stale content due to aggressive caching
  • Analytics tracking gaps
  • Broken offline experiences

Issues in This Category

Quick Diagnostic Checklist

PWA Requirements

For a PWA to be installable (Chrome's criteria):

  1. HTTPS - Site served over secure connection
  2. Valid manifest - Web app manifest with required fields
  3. Service worker - Registered with fetch handler
  4. Icons - At least 192x192 and 512x512 icons
  5. Start URL - Defined in manifest

DevTools PWA Audit

Chrome DevTools > Application tab:

  • Manifest - Check for errors and warnings
  • Service Workers - Verify registration status
  • Storage - Review cached assets

Lighthouse PWA audit:

  1. Open DevTools > Lighthouse
  2. Check "Progressive Web App"
  3. Run audit
  4. Review PWA-specific recommendations

Common PWA Configurations

Minimal Web App Manifest

{
  "name": "BlueFrog Analytics",
  "short_name": "BlueFrog",
  "start_url": "/",
  "display": "standalone",
  "background_color": "#ffffff",
  "theme_color": "#1f75fe",
  "icons": [
    {
      "src": "/icons/icon-192.png",
      "sizes": "192x192",
      "type": "image/png"
    },
    {
      "src": "/icons/icon-512.png",
      "sizes": "512x512",
      "type": "image/png"
    }
  ]
}

Basic Service Worker Registration

// In your main JavaScript file
if ('serviceWorker' in navigator) {
  window.addEventListener('load', () => {
    navigator.serviceWorker.register('/sw.js')
      .then(registration => {
        console.log('SW registered:', registration.scope);
      })
      .catch(error => {
        console.log('SW registration failed:', error);
      });
  });
}
<link rel="manifest" href="/manifest.json">
<meta name="theme-color" content="#1f75fe">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="default">

PWA and Analytics Considerations

Service workers can interfere with analytics:

  • Cached pages may not trigger pageviews
  • Offline events need queueing and replay
  • Service worker scope affects tracking script loading
  • Install events should be tracked

See Offline Tracking for analytics in PWAs.

Diagnostic Tools

Tool Purpose
Lighthouse PWA Audit Comprehensive PWA checklist
Chrome DevTools Application Tab Manifest, SW, storage inspection
PWA Builder Generate and validate manifests
Workbox Service worker library and tools

Platform-Specific Considerations

Platform PWA Support
Shopify Limited - requires custom theme work
WordPress Plugins available (PWA for WP)
Next.js Built-in with next-pwa plugin
Nuxt.js @vite-pwa/nuxt module
Gatsby gatsby-plugin-offline
// SYS.FOOTER