mirror of
https://codeberg.org/vlw/victorwesterlund.com.git
synced 2025-09-14 11:33:41 +02:00
* dev-12140843 * dev-12140844 * Update sw.js * Update not_found.html * Update sw.js
This commit is contained in:
parent
c6e4eab25f
commit
4a181e15e9
2 changed files with 7 additions and 11 deletions
|
@ -5,8 +5,8 @@
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
<meta name="description" content="Full-stack web developer from Stockholm, Sweden.">
|
<meta name="description" content="Full-stack web developer from Stockholm, Sweden.">
|
||||||
<meta name="theme-color" content="#ffffff">
|
<meta name="theme-color" content="#ffffff">
|
||||||
<link href="assets/img/favicon.png" rel="icon">
|
<link href="/assets/img/favicon.png" rel="icon">
|
||||||
<link href="assets/css/style.css" rel="stylesheet">
|
<link href="/assets/css/style.css" rel="stylesheet">
|
||||||
<title>Page Not Found - Victor Westerlund</title>
|
<title>Page Not Found - Victor Westerlund</title>
|
||||||
<style>
|
<style>
|
||||||
#content {
|
#content {
|
||||||
|
@ -63,9 +63,9 @@
|
||||||
<h2>idk..</h2>
|
<h2>idk..</h2>
|
||||||
</div>
|
</div>
|
||||||
<picture>
|
<picture>
|
||||||
<source srcset="assets/img/where.webp" type="image/webp">
|
<source srcset="/assets/img/where.webp" type="image/webp">
|
||||||
<source srcset="assets/img/where.gif" type="image/gif">
|
<source srcset="/assets/img/where.gif" type="image/gif">
|
||||||
<img srcset="assets/img/where.png" type="image/png"/>
|
<img srcset="/assets/img/where.png" type="image/png"/>
|
||||||
</picture>
|
</picture>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
|
@ -1,4 +1,4 @@
|
||||||
const version = "12140809";
|
const version = "12140858";
|
||||||
const root = "/";
|
const root = "/";
|
||||||
|
|
||||||
let activeCaches = [
|
let activeCaches = [
|
||||||
|
@ -62,11 +62,7 @@ self.addEventListener("fetch", event => {
|
||||||
// Get pattern.gif from generator. Fallback to cache on failure
|
// Get pattern.gif from generator. Fallback to cache on failure
|
||||||
if(origin && url.pathname.endsWith("pattern.gif")) {
|
if(origin && url.pathname.endsWith("pattern.gif")) {
|
||||||
const pattern = new Request(`${location.origin}${root}assets/img/pattern.php`);
|
const pattern = new Request(`${location.origin}${root}assets/img/pattern.php`);
|
||||||
event.respondWith(
|
event.respondWith(fetch(pattern).catch(() => caches.match(root + "assets/img/pattern.gif")));
|
||||||
fetch(pattern).catch(() => {
|
|
||||||
return caches.match(event.request);
|
|
||||||
})
|
|
||||||
);
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue