Fix: /api/notes ins SW Cacheable-Liste aufnehmen, SW by-v1089
Step 4 der Offline-Pfote (Weitere Listen) blieb weiß weil /api/notes nicht in _CACHEABLE_GET stand — Notes-Requests wurden vom SW gar nicht gecacht, egal wie oft sie geladen wurden. Regex /^\/api\/notes/ ergänzt — jetzt cached der SW Notes-GETs mit Stale-While-Revalidate (default 5min TTL).
This commit is contained in:
parent
03725d6682
commit
d47fb61abf
4 changed files with 12 additions and 11 deletions
|
|
@ -410,7 +410,7 @@ async def serve_media(path: str, request: _Request):
|
|||
raise _HE(404, "Nicht gefunden.")
|
||||
return _media_response(filepath)
|
||||
|
||||
APP_VER = "1088" # muss mit APP_VER in app.js übereinstimmen
|
||||
APP_VER = "1089" # muss mit APP_VER in app.js übereinstimmen
|
||||
|
||||
@app.get("/.well-known/assetlinks.json")
|
||||
async def assetlinks():
|
||||
|
|
|
|||
|
|
@ -101,9 +101,9 @@
|
|||
</script>
|
||||
|
||||
<!-- CSS: Reihenfolge ist wichtig — ?v= zwingt Browser zur Neuladung -->
|
||||
<link rel="stylesheet" href="/css/design-system.css?v=1088">
|
||||
<link rel="stylesheet" href="/css/layout.css?v=1088">
|
||||
<link rel="stylesheet" href="/css/components.css?v=1088">
|
||||
<link rel="stylesheet" href="/css/design-system.css?v=1089">
|
||||
<link rel="stylesheet" href="/css/layout.css?v=1089">
|
||||
<link rel="stylesheet" href="/css/components.css?v=1089">
|
||||
</head>
|
||||
<body>
|
||||
|
||||
|
|
@ -625,11 +625,11 @@
|
|||
<div id="modal-container"></div>
|
||||
|
||||
<!-- JS: Reihenfolge ist wichtig — erst Basis, dann Features -->
|
||||
<script src="/js/api.js?v=1088"></script>
|
||||
<script src="/js/ui.js?v=1088"></script>
|
||||
<script src="/js/app.js?v=1088"></script>
|
||||
<script src="/js/worlds.js?v=1088"></script>
|
||||
<script src="/js/offline-indicator.js?v=1088"></script>
|
||||
<script src="/js/api.js?v=1089"></script>
|
||||
<script src="/js/ui.js?v=1089"></script>
|
||||
<script src="/js/app.js?v=1089"></script>
|
||||
<script src="/js/worlds.js?v=1089"></script>
|
||||
<script src="/js/offline-indicator.js?v=1089"></script>
|
||||
|
||||
<!-- Feature-Seiten werden lazy geladen -->
|
||||
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
Router, State-Management, Navigation, Initialisierung.
|
||||
============================================================ */
|
||||
|
||||
const APP_VER = '1088'; // ← bei jedem Deploy mit Frontend-Änderungen erhöhen
|
||||
const APP_VER = '1089'; // ← bei jedem Deploy mit Frontend-Änderungen erhöhen
|
||||
const APP_VERSION = '1.6.0'; // ← semantische Version, wird bei make release gesetzt
|
||||
window.APP_VER = APP_VER; // global verfügbar für andere Module (z.B. offline-indicator)
|
||||
window.APP_VERSION = APP_VERSION;
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
============================================================ */
|
||||
|
||||
// ← EINZIGE Stelle für die Version — STATIC_ASSETS und CACHE_VERSION leiten sich ab
|
||||
const VER = '1088';
|
||||
const VER = '1089';
|
||||
const CACHE_VERSION = `by-v${VER}`;
|
||||
const CACHE_STATIC = `${CACHE_VERSION}-static`;
|
||||
const CACHE_TILES = 'ban-yaro-tiles-v1'; // bleibt über SW-Updates erhalten
|
||||
|
|
@ -175,6 +175,7 @@ const _CACHEABLE_GET = [
|
|||
/^\/api\/walks/,
|
||||
/^\/api\/lost/,
|
||||
/^\/api\/expenses/,
|
||||
/^\/api\/notes/,
|
||||
// Drei Welten — offline-fähig
|
||||
/^\/api\/streak\/\d+/,
|
||||
/^\/api\/forum\/threads/,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue