PageSourceSearch

https://www.finwe.fi/sw.js

js finwe.fi collected 2026-10-04 21:25:58 UTC 3,550 bytes, 111 lines download raw bytes

1/**
2 * Welcome to your Workbox-powered service worker!
3 *
4 * You'll need to register this file in your web app and you should
5 * disable HTTP caching for this file too.
6 * See https://goo.gl/nhQhGp
7 *
8 * The rest of the code is auto-generated. Please don't update this file
9 * directly; instead, make changes to your Workbox build configuration
10 * and re-run your build process.
11 * See https://goo.gl/2aRDsh
12 */
13
14importScripts("workbox-v3.6.3/workbox-sw.js");
15workbox.setConfig({modulePathPrefix: "workbox-v3.6.3"});
16
17workbox.core.setCacheNameDetails({prefix: "gatsby-plugin-offline"});
18
19workbox.skipWaiting();
20workbox.clientsClaim();
21
22/**
23 * The workboxSW.precacheAndRoute() method efficiently caches and responds to
24 * requests for URLs in the manifest.
25 * See https://goo.gl/S9QRab
26 */
27self.__precacheManifest = [
28  {
29    "url": "webpack-runtime-a0f719af9cabc9a81267.js"
30  },
31  {
32    "url": "styles.ce112e8094f8124b1987.css"
33  },
34  {
35    "url": "styles-4a87c59f6ef0628ec137.js"
36  },
37  {
38    "url": "framework-adb9fbbad434d677ece7.js"
39  },
40  {
41    "url": "app-56c9e49c1b0778498f01.js"
42  },
43  {
44    "url": "component---node-modules-gatsby-plugin-offline-app-shell-js-0c5dfe2a47ab80d05215.js"
45  },
46  {
47    "url": "offline-plugin-app-shell-fallback/index.html",
48    "revision": "88faba9cd729aed215cd5b3cff2d572c"
49  },
50  {
51    "url": "polyfill-bb6386d6732021135bed.js"
52  },
53  {
54    "url": "manifest.webmanifest",
55    "revision": "e7398c95d02bba4c74ad5abe86619662"
56  }
57].concat(self.__precacheManifest || []);
58workbox.precaching.suppressWarnings();
59workbox.precaching.precacheAndRoute(self.__precacheManifest, {});
60
61workbox.routing.registerRoute(/(\.js$|\.css$|static\/)/, workbox.strategies.cacheFirst(), 'GET');
62workbox.routing.registerRoute(/^https?:.*\page-data\/.*\/page-data\.json/, workbox.strategies.networkFirst(), 'GET');
63workbox.routing.registerRoute(/^https?:.*\.(png|jpg|jpeg|webp|svg|gif|tiff|js|woff|woff2|json|css)$/, workbox.strategies.staleWhileRevalidate(), 'GET');
64workbox.routing.registerRoute(/^https?:\/\/fonts\.googleapis\.com\/css/, workbox.strategies.staleWhileRevalidate(), 'GET');
65
66/* global importScripts, workbox, idbKeyval */
67
68importScripts(`idb-keyval-iife.min.js`)
69
70const { NavigationRoute } = workbox.routing
71
72const navigationRoute = new NavigationRoute(async ({ event }) => {
73  let { pathname } = new URL(event.request.url)
74  pathname = pathname.replace(new RegExp(`^`), ``)
75
76  // Check for resources + the app bundle
77  // The latter may not exist if the SW is updating to a new version
78  const resources = await idbKeyval.get(`resources:${pathname}`)
79  if (!resources || !(await caches.match(`/app-56c9e49c1b0778498f01.js`))) {
80    return await fetch(event.request)
81  }
82
83  for (const resource of resources) {
84    // As soon as we detect a failed resource, fetch the entire page from
85    // network - that way we won't risk being in an inconsistent state with
86    // some parts of the page failing.
87    if (!(await caches.match(resource))) {
88      return await fetch(event.request)
89    }
90  }
91
92  const offlineShell = `/offline-plugin-app-shell-fallback/index.html`
93  return await caches.match(offlineShell)
94})
95
96workbox.routing.registerRoute(navigationRoute)
97
98const messageApi = {
99  setPathResources(event, { path, resources }) {
100    event.waitUntil(idbKeyval.set(`resources:${path}`, resources))
101  },
102
103  clearPathResources(event) {
104    event.waitUntil(idbKeyval.clear())
105  },
106}
107
108self.addEventListener(`message`, event => {
109  const { gatsbyApi } = event.data
110  if (gatsbyApi) messageApi[gatsbyApi](event, event.data)
111})

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.