From e961cd0a60723cb695fcd6e6ffce9e9e9159c4ac Mon Sep 17 00:00:00 2001 From: Kenneth Reitz Date: Sun, 30 Nov 2025 02:22:13 -0500 Subject: [PATCH] Move technical status front and center, fix SW caching MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Add no-cache headers to sw.js endpoint to prevent aggressive caching - Move system status grid to top of offline page for debugging - Show connection status, SW version, cache storage, bible data, pages cached - Add SW version check that reads from actual sw.js file - Keep download progress indicator in download section - Move cached pages list to collapsible details 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- kjvstudy_org/server.py | 7 +- kjvstudy_org/templates/offline.html | 108 ++++++++++++++++++---------- 2 files changed, 75 insertions(+), 40 deletions(-) diff --git a/kjvstudy_org/server.py b/kjvstudy_org/server.py index 9424844..9ea3ebf 100644 --- a/kjvstudy_org/server.py +++ b/kjvstudy_org/server.py @@ -228,7 +228,12 @@ async def service_worker(): return FileResponse( sw_path, media_type="application/javascript", - headers={"Service-Worker-Allowed": "/"} + headers={ + "Service-Worker-Allowed": "/", + "Cache-Control": "no-cache, no-store, must-revalidate", + "Pragma": "no-cache", + "Expires": "0" + } ) app.mount("/static", StaticFiles(directory=str(static_dir)), name="static") diff --git a/kjvstudy_org/templates/offline.html b/kjvstudy_org/templates/offline.html index 55a96b9..d028f49 100644 --- a/kjvstudy_org/templates/offline.html +++ b/kjvstudy_org/templates/offline.html @@ -320,7 +320,19 @@ border-top: 1px solid var(--border-color); } -/* Technical Details */ +/* Technical Status Section */ +.tech-section { + margin-bottom: 3rem; +} + +.tech-grid { + display: grid; + grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); + gap: 1rem; + margin-bottom: 2rem; +} + +/* Technical Details (collapsed) */ .tech-details { margin-bottom: 3rem; } @@ -349,13 +361,6 @@ content: '- '; } -.tech-grid { - display: grid; - grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); - gap: 1rem; - margin-bottom: 2rem; -} - .tech-item { padding: 1rem; border: 1px solid var(--border-color); @@ -514,6 +519,37 @@

Access the scriptures anywhere, anytime. Download all ~48,000 pages including every chapter, verse commentary, interlinear text, Bible stories, and study resources for complete offline access.

+ +
+

System Status

+
+
+
Connection
+
Checking...
+
+
+
Service Worker
+
Checking...
+
+
+
Cache Storage
+
Checking...
+
+
+
Bible Data
+
Checking...
+
+
+
Pages Cached
+
Checking...
+
+
+
SW Version
+
Checking...
+
+
+
+
@@ -522,7 +558,6 @@
Checking status...
Please wait
- ...
@@ -599,32 +634,11 @@ - +
- Technical Details -
-
-
Service Worker
-
Checking...
-
-
-
Cache Storage
-
Checking...
-
-
-
Bible Data
-
Checking...
-
-
-
Pages Cached
-
Checking...
-
-
-
-

Cached Pages 0

- + Cached Pages (0) +
{% endblock %} @@ -632,8 +646,9 @@ {% block extra_js %}