Fixes issue

OwlBoard/backend#7
This commit is contained in:
Fred Boniface 2023-04-03 01:15:51 +01:00
parent cba06873c3
commit 7f077b76be
5 changed files with 13 additions and 8 deletions

View File

@ -10,7 +10,7 @@
<title>OwlBoard - Loading</title> <title>OwlBoard - Loading</title>
<link rel="apple-touch-icon" href="/images/app-icons/any/apple-192.png"> <link rel="apple-touch-icon" href="/images/app-icons/any/apple-192.png">
<link rel="stylesheet" type="text/css" href="./styles/main.css"/> <link rel="stylesheet" type="text/css" href="./styles/main.css"/>
<link rel="stylesheet" type="text/css" href="./styles/boards.css"/> <link rel="stylesheet" type="text/css" href="./styles/board.css"/>
<link rel="icon" type="image/svg+xml" href="./images/icon.svg"/> <link rel="icon" type="image/svg+xml" href="./images/icon.svg"/>
<link rel="manifest" type="application/json" href="./manifest.json"/> <link rel="manifest" type="application/json" href="./manifest.json"/>
<script src="./js/lib.main.js" defer></script> <script src="./js/lib.main.js" defer></script>

View File

@ -39,7 +39,7 @@ http {
gzip_static on; gzip_static on;
brotli_static on; brotli_static on;
error_page 404 /404.html; error_page 404 /404.html;
expires 3d; expires 2d;
add_header Cache-Control "public, no-transform"; add_header Cache-Control "public, no-transform";
} }
@ -57,7 +57,7 @@ http {
proxy_cache_key $scheme://$host$uri$is_args$query_string; proxy_cache_key $scheme://$host$uri$is_args$query_string;
proxy_ignore_headers Cache-Control; proxy_ignore_headers Cache-Control;
proxy_cache_valid 200 10080m; proxy_cache_valid 200 10080m;
expires 3d; expires 7d;
add_header Cache-Control "public, no-transform"; add_header Cache-Control "public, no-transform";
} }
} }

View File

@ -60,11 +60,15 @@
<div id="quick_links"> <div id="quick_links">
</div> </div>
<div class="text-description"> <div class="text-description">
<p>A cache error means that some users are seeing a faulty layout on departure board pages,
an update to fix this has been made available but it may take a few days for this fix to
be downloaded to your device.
</p>
<p>Customise your quick links on the <a href="/settings.html">Settings</a> page.</p> <p>Customise your quick links on the <a href="/settings.html">Settings</a> page.</p>
</div> </div>
<!-- Footer --> <!-- Footer -->
<footer> <footer>
<p>Created by <a href="https://fredboniface.co.uk" target="_blank" rel="noreferrer noopener">Fred Boniface</a> - <span id="ver_str">1.2.3</span></p> <p>Created by <a href="https://fredboniface.co.uk" target="_blank" rel="noreferrer noopener">Fred Boniface</a> - <span id="ver_str">1.2.4</span></p>
</footer> </footer>
</body> </body>
</html> </html>

9
sw.js
View File

@ -1,10 +1,11 @@
/* Service Worker */ /* Service Worker */
const appVersion = "1.2.3" const appVersion = "1.2.4"
const cacheName = `owlboard-${appVersion}`; const cacheName = `owlboard-${appVersion}`;
const cacheIDs = [cacheName]; const cacheIDs = [cacheName];
const cacheFiles = [ const cacheFiles = [
"/404.html", "/404.html",
"/board.html",
"/conn-err.html", "/conn-err.html",
"/help.html", "/help.html",
"/", "/",
@ -16,7 +17,7 @@ const cacheFiles = [
"/styles/fonts/firamono/firamono-regular.woff2", "/styles/fonts/firamono/firamono-regular.woff2",
"/styles/fonts/urwgothic/urwgothic.woff2", "/styles/fonts/urwgothic/urwgothic.woff2",
"/styles/fonts/urwgothic/urwgothicDemi.woff2", "/styles/fonts/urwgothic/urwgothicDemi.woff2",
"/styles/boards.css", "/styles/board.css",
"/styles/find-code.css", "/styles/find-code.css",
"/styles/help.css", "/styles/help.css",
"/styles/issue.css", "/styles/issue.css",
@ -32,8 +33,8 @@ const cacheFiles = [
"/images/icon.svg", "/images/icon.svg",
"/images/logo/wide_logo.svg", "/images/logo/wide_logo.svg",
"/images/logo/mono-logo.svg", "/images/logo/mono-logo.svg",
"images/app-icons/any/plain-logo.svg", "/images/app-icons/any/plain-logo.svg",
"images/app-icons/any/plain-logo-512.png", "/images/app-icons/any/plain-logo-512.png",
"/images/nav/alert_icon.svg", "/images/nav/alert_icon.svg",
"/images/nav/save.svg", "/images/nav/save.svg",
"/images/nav/home_icon.svg", "/images/nav/home_icon.svg",