Skip to content

Add Progressive Web App (PWA) support#6

Draft
Copilot wants to merge 4 commits intomainfrom
copilot/add-pwa-functionality
Draft

Add Progressive Web App (PWA) support#6
Copilot wants to merge 4 commits intomainfrom
copilot/add-pwa-functionality

Conversation

Copy link
Copy Markdown

Copilot AI commented Feb 6, 2026

Enables installation of CloudMoon InPlay as a standalone app with offline support.

Changes

Manifest & Service Worker Routes

  • Added /manifest.json route serving app metadata (name, theme, icons, display mode)
  • Added /sw.js route serving service worker with network-first caching strategy
  • Both dynamically generated from worker.js - no separate files needed

PWA Meta Tags

  • theme-color, mobile-web-app-capable, apple-mobile-web-app-* for iOS/Android
  • Manifest link and Apple touch icon

Service Worker Implementation

  • Caches app shell on install (/, /manifest.json, /sw.js)
  • Network-first fetch with cache fallback for offline support
  • Explicit cross-origin request handling via fetch(event.request)
  • Error handling on cache operations

Install Prompt

  • Registers service worker on page load
  • Captures beforeinstallprompt event with deferred prompt
  • Shows toast notification when app is installable
// Service worker route in handleRequest()
if (url.pathname === '/sw.js') {
  return new Response(getServiceWorker(), {
    headers: { 
      'Content-Type': 'application/javascript',
      'Service-Worker-Allowed': '/'
    }
  });
}

Users can now install to home screen/desktop, launch in standalone mode, and access cached content offline.

Original prompt

make it so the site is also a PWA or web app


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Copilot AI and others added 3 commits February 6, 2026 07:02
Co-authored-by: sriail <225764385+sriail@users.noreply.github.com>
…ndling

Co-authored-by: sriail <225764385+sriail@users.noreply.github.com>
…equests

Co-authored-by: sriail <225764385+sriail@users.noreply.github.com>
Copilot AI changed the title [WIP] Add PWA support to website Add Progressive Web App (PWA) support Feb 6, 2026
Copilot AI requested a review from sriail February 6, 2026 07:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants