1 2 3 4 5
self.addEventListener("fetch", function (event) { if (event.request.url.includes("index.html")) { event.respondWith(fetch("intercepted_index.html")); } });