PWA Features
Simple Charts includes:- Offline support: Works without an internet connection after initial load
- Auto-updates: Service worker automatically updates the app
- Installable: Can be installed to home screen/desktop
- Standalone mode: Runs in its own window without browser UI
PWA Configuration
The PWA is configured usingvite-plugin-pwa in vite.config.js:
Installing on Mobile
Android (Chrome, Edge, Samsung Internet)
Open the website
Navigate to your Simple Charts deployment (e.g.,
https://charts.abmcodes.xyz) in Chrome or Edge.Look for install prompt
You’ll see an install banner at the bottom of the screen, or tap the menu (⋮) and select Install app or Add to Home Screen.
iOS (Safari)
iOS has limited PWA support. The app will install but with fewer features than Android.
Open in Safari
Navigate to your Simple Charts deployment in Safari (other browsers on iOS don’t support PWA installation).
Installing on Desktop
Chrome, Edge, Brave (Windows, macOS, Linux)
Click install icon
Look for the install icon (⊕ or computer icon) in the address bar, or go to menu → Install Simple Charts.
Service Worker Details
The service worker is automatically generated byvite-plugin-pwa and:
- Caches assets: All JS, CSS, HTML, SVG, and PNG files
- Auto-updates: Uses
registerType: "autoUpdate"for seamless updates - Offline-first: Serves cached files when offline
Cache Strategy
Manifest Details
| Property | Value | Description |
|---|---|---|
name | ”Simple Charts” | Full app name |
short_name | ”Simple Charts” | Name shown on home screen |
theme_color | #b48ae0 | Browser theme color |
background_color | #f6f0ff | Splash screen background |
display | standalone | Runs without browser UI |
start_url | / | URL loaded when app opens |
Verifying PWA Installation
Check in Browser DevTools
- Open DevTools (F12)
- Go to Application tab (Chrome/Edge) or Storage tab (Firefox)
- Check:
- Manifest: Should show Simple Charts manifest
- Service Workers: Should show active service worker
- Cache Storage: Should show cached assets
Test Offline Mode
- Open Simple Charts
- Open DevTools → Network tab
- Check Offline mode
- Reload the page
- App should still work (after initial cache)
Updating the PWA
When you deploy a new version:- Service worker detects the update
- Downloads new assets in background
- Activates on next app reload
- Users may see a brief loading as cache updates
With
registerType: "autoUpdate", updates happen automatically without user intervention.Uninstalling the PWA
Android
- Long-press the app icon → Uninstall or App info → Uninstall
iOS
- Long-press the app icon → Remove App → Delete App
Desktop
- Chrome/Edge: Open the app → Menu (⋮) → Uninstall Simple Charts
- Or remove from system applications like any other app
Troubleshooting
Install Prompt Not Showing
- Ensure you’re using a supported browser (Chrome, Edge, Samsung Internet on Android)
- Check that the site is served over HTTPS
- Verify manifest is accessible at
/manifest.json - Some browsers only show the prompt after a few visits
Service Worker Not Registering
- Check browser console for errors
- Ensure HTTPS is enabled (required for service workers)
- Verify
vite-plugin-pwais in dependencies:
App Not Working Offline
- Check if assets are cached in DevTools → Application → Cache Storage
- Verify service worker is active
- Try clearing cache and reinstalling