[ Web Proxy ]
URL:
Viewing: https://developer.mozilla.org/ja/docs/Web/API/WorkerGlobalScope/caches [Back]  [Original]

WorkerGlobalScope: caches - Web API | MDN

MDN Web Docs

View in English Always switch to English

WorkerGlobalScope: caches

Baseline

20184

: (HTTPS)

:

caches WorkerGlobalScope CacheStorage (assets)

CacheStorage

js
self.addEventListener("install", (event) => {
  event.waitUntil(
    self.caches
      .open("v1")
      .then((cache) =>
        cache.addAll([
          "/",
          "/index.html",
          "/style.css",
          "/app.js",
          "/image-list.js",
          "/star-wars-logo.jpg",
          "/gallery/",
          "/gallery/bountyHunters.jpg",
          "/gallery/myLittleVader.jpg",
          "/gallery/snowTroopers.jpg",
        ]),
      ),
  );
});

Service Workers Nightly
# self-caches


Web Proxy Viewer  |  New URL  |  Original Page