about summary refs log tree commit diff stats
path: root/js/name-gen/app.js
Commit message (Expand)AuthorAgeFilesLines
* *elioat2024-01-051-0/+7
* *elioat2024-01-051-1/+1
* *elioat2024-01-051-0/+51
id='n37' href='#n37'>37 38 39 40 41 42 43
const CACHE_NAME = 'lut-cam-cache-v1';
const urlsToCache = [
    '/',
    './',
    'index.html',
    'lut.js',
    'service-worker.js',
    'android-icon-192x192.png',
    'android-icon-512x512.png',
    'favicon.ico',
    'favicon-16x16.png',
    'favicon-32x32.png',
    'favicon-96x96.png',
    'apple-icon-57x57.png',
    'apple-icon-60x60.png',
    'apple-icon-72x72.png',
    'apple-icon-76x76.png',
    'apple-icon-114x114.png',
    'apple-icon-120x120.png',
    'apple-icon-144x144.png',
    'apple-icon-152x152.png'
];

self.addEventListener('install', event => {
  event.waitUntil(
    caches.open(CACHE_NAME)
      .then(cache => {
        return cache.addAll(urlsToCache);
      })
  );
});

self.addEventListener('fetch', event => {
  event.respondWith(
    caches.match(event.request)
      .then(response => {
        if (response) {
          return response;
        }
        return fetch(event.request);
      })
  );
});