- Updated the cache revision for index.html in the service worker to ensure proper asset management. - Enhanced AppSwitcher.vue with a new online status button for mobile/tablet views and a dropdown for desktop. - Improved setup-https-dev.sh to include PWA snippet for nginx configuration, facilitating Android install and ensuring HTTPS is properly set up for PWA functionality.
18 lines
758 B
Plaintext
18 lines
758 B
Plaintext
# PWA installability - required for Add to Home Screen on Android
|
|
# Include this inside the HTTPS server block for archipelago
|
|
# Manifest must have Content-Type: application/manifest+json
|
|
location = /manifest.webmanifest {
|
|
add_header Content-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";
|
|
}
|