Frontend: Adjust cache headers and sw cache

Signed-off-by: Fred Boniface <fred@fjla.uk>
This commit is contained in:
Fred Boniface 2023-02-04 07:57:12 +00:00
parent 2a602ace7a
commit 0e819046c5
3 changed files with 7 additions and 5 deletions

View File

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

View File

@ -62,7 +62,7 @@
<!-- Footer -->
<footer>
<p>Created by <a href="https://fredboniface.co.uk" target="_blank" rel="noreferrer noopener">Fred Boniface</a> - 0.0.1-dev-2023020302</p>
<p>Created by <a href="https://fredboniface.co.uk" target="_blank" rel="noreferrer noopener">Fred Boniface</a> - 0.0.1-dev-2023020401</p>
</footer>
</body>

View File

@ -1,6 +1,6 @@
/* Service Worker */
const appVersion = "0.0.1-dev-2023020316"
const appVersion = "0.0.1-dev-2023020401"
const cacheName = `owlboard-${appVersion}`
const cacheIDs = [cacheName]
const cacheFiles = [
@ -31,10 +31,12 @@ const cacheFiles = [
"/images/icon.svg",
"/images/logo/wide_logo.svg",
"/images/logo/mono-logo.svg",
"images/app-icons/any/app-256.png",
"/images/nav/alert_icon.svg",
"/images/nav/save.svg",
"/images/nav/home_icon.svg",
"/images/nre/nre-powered_200w.webp"
"/images/nre/nre-powered_400w.webp",
"/images/nre/nre-powered_400w.jxl"
]
self.addEventListener("install", (e) => {