sw_fetch.js (430B)
1 /* This Source Code Form is subject to the terms of the Mozilla Public 2 * License, v. 2.0. If a copy of the MPL was not distributed with this 3 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ 4 5 self.oninstall = _ => { 6 self.skipWaiting(); 7 }; 8 9 self.onactivate = event => { 10 event.waitUntil(self.clients.claim()); 11 }; 12 13 self.onfetch = event => { 14 event.respondWith(fetch(event.request, { credentials: "include" })); 15 };