fix: improve PWA manifest and SW cache for Android standalone mode

- Add id field and display_override to manifest.json for reliable
  Chrome Android PWA recognition
- Serve manifest.json with application/manifest+json MIME type
- Add /i18n.js and locale files to SW app shell cache (were missing)
- Bump SW cache version to v21

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Ulas
2026-04-01 09:07:57 +02:00
parent dd940ab05d
commit cd9f26911b
3 changed files with 12 additions and 3 deletions
+4
View File
@@ -112,6 +112,10 @@ app.use(express.static(path.join(__dirname, '..', 'public'), {
// HTML, JS, CSS, JSON, manifest, sw — immer revalidieren
res.setHeader('Cache-Control', 'no-cache, must-revalidate');
}
// manifest.json: korrekter MIME-Type für PWA-Erkennung durch Chrome/Android
if (filePath.endsWith('manifest.json')) {
res.setHeader('Content-Type', 'application/manifest+json; charset=utf-8');
}
},
}));