PageSourceSearch

https://ricepuritytests.com/sw.js

js ricepuritytests.com collected 2026-10-04 02:14:23 UTC 1,098 bytes, 40 lines download raw bytes

1const CACHE_NAME = 'ricepuritytests-v1'
2const APP_SHELL = ['/', '/site.webmanifest', '/logo.png', '/icon-192.png', '/icon-512.png']
3
4self.addEventListener('install', (event) => {
5  event.waitUntil(
6    caches.open(CACHE_NAME).then((cache) => cache.addAll(APP_SHELL))
7  )
8  self.skipWaiting()
9})
10
11self.addEventListener('activate', (event) => {
12  event.waitUntil(
13    caches.keys().then((keys) =>
14      Promise.all(
15        keys
16          .filter((key) => key !== CACHE_NAME)
17          .map((key) => caches.delete(key))
18      )
19    )
20  )
21  self.clients.claim()
22})
23
24self.addEventListener('fetch', (event) => {
25  if (event.request.method !== 'GET') return
26
27  event.respondWith(
28    caches.match(event.request).then((cachedResponse) => {
29      if (cachedResponse) return cachedResponse
30
31      return fetch(event.request)
32        .then((networkResponse) => {
33          const responseClone = networkResponse.clone()
34          caches.open(CACHE_NAME).then((cache) => cache.put(event.request, responseClone))
35          return networkResponse
36        })
37        .catch(() => caches.match('/'))
38    })
39  )
40})

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.