- Added PWAInstallPrompt component to facilitate app installation beyond the "Add to Home Screen" option. - Updated vite.config.ts to include display_override and id properties for improved PWA manifest. - Modified nginx configuration to ensure proper serving of the manifest with application/manifest+json type for better installability on Android.
17 lines
728 B
Plaintext
17 lines
728 B
Plaintext
# PWA installability - required for Install (not just Add to Home Screen) on Android
|
|
# Manifest MUST be served with application/manifest+json - Chrome rejects otherwise
|
|
location = /manifest.webmanifest {
|
|
default_type application/manifest+json;
|
|
add_header Cache-Control "public, max-age=0, must-revalidate";
|
|
}
|
|
# Service worker - no cache so updates apply
|
|
location ~ ^/(sw\.js|workbox-.*\.js|registerSW\.js)$ {
|
|
add_header Content-Type application/javascript;
|
|
add_header Service-Worker-Allowed /;
|
|
add_header Cache-Control "no-cache, no-store, must-revalidate";
|
|
}
|
|
# index.html - avoid aggressive cache for PWA updates
|
|
location = /index.html {
|
|
add_header Cache-Control "public, max-age=0, must-revalidate";
|
|
}
|