PageSourceSearch

https://social-pillow.netlify.app/sw.js

js social-pillow.netlify.app collected 2026-10-03 11:25:38 UTC 3,567 bytes, 107 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-5412aa037d4af5e14f2f.js"
30  },
31  {
32    "url": "styles.3b8a89162ef8a88c4b1e.css"
33  },
34  {
35    "url": "styles-3e3e855effb6887c66f8.js"
36  },
37  {
38    "url": "commons-cf9af893a401ba152dab.js"
39  },
40  {
41    "url": "netlify-identity-widget-0650b31a1c4ef597d787.js"
42  },
43  {
44    "url": "app-c6f36e3c551c44c1f1d9.js"
45  },
46  {
47    "url": "component---node-modules-gatsby-plugin-offline-app-shell-js-49ac284587dff2030b81.js"
48  },
49  {
50    "url": "offline-plugin-app-shell-fallback/index.html",
51    "revision": "4e35fed29952de1f541b6bde43b202a4"
52  }
53].concat(self.__precacheManifest || []);
54workbox.precaching.suppressWarnings();
55workbox.precaching.precacheAndRoute(self.__precacheManifest, {});
56
57workbox.routing.registerRoute(/(\.js$|\.css$|static\/)/, workbox.strategies.cacheFirst(), 'GET');
58workbox.routing.registerRoute(/^https?:.*\page-data\/.*\/page-data\.json/, workbox.strategies.networkFirst(), 'GET');
59workbox.routing.registerRoute(/^https?:.*\.(png|jpg|jpeg|webp|svg|gif|tiff|js|woff|woff2|json|css)$/, workbox.strategies.staleWhileRevalidate(), 'GET');
60workbox.routing.registerRoute(/^https?:\/\/fonts\.googleapis\.com\/css/, workbox.strategies.staleWhileRevalidate(), 'GET');
61
62/* global importScripts, workbox, idbKeyval */
63
64importScripts(`idb-keyval-iife.min.js`)
65
66const { NavigationRoute } = workbox.routing
67
68const navigationRoute = new NavigationRoute(async ({ event }) => {
69  let { pathname } = new URL(event.request.url)
70  pathname = pathname.replace(new RegExp(`^https://social-pillow.netlify.app`), ``)
71
72  // Check for resources + the app bundle
73  // The latter may not exist if the SW is updating to a new version
74  const resources = await idbKeyval.get(`resources:${pathname}`)
75  if (!resources || !(await caches.match(`https://social-pillow.netlify.app/app-c6f36e3c551c44c1f1d9.js`))) {
76    return await fetch(event.request)
77  }
78
79  for (const resource of resources) {
80    // As soon as we detect a failed resource, fetch the entire page from
81    // network - that way we won't risk being in an inconsistent state with
82    // some parts of the page failing.
83    if (!(await caches.match(resource))) {
84      return await fetch(event.request)
85    }
86  }
87
88  const offlineShell = `https://social-pillow.netlify.app/offline-plugin-app-shell-fallback/index.html`
89  return await caches.match(offlineShell)
90})
91
92workbox.routing.registerRoute(navigationRoute)
93
94const messageApi = {
95  setPathResources(event, { path, resources }) {
96    event.waitUntil(idbKeyval.set(`resources:${path}`, resources))
97  },
98
99  clearPathResources(event) {
100    event.waitUntil(idbKeyval.clear())
101  },
102}
103
104self.addEventListener(`message`, event => {
105  const { gatsbyApi } = event.data
106  if (gatsbyApi) messageApi[gatsbyApi](event, event.data)
107})

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.