This repository has been archived on 2024-11-13. You can view files and clone it, but cannot push or open issues or pull requests.
fediversity.eu/public/service-worker.js

11 lines
259 B
JavaScript
Raw Normal View History

2024-04-02 10:29:00 +02:00
importScripts(
"https://storage.googleapis.com/workbox-cdn/releases/6.0.2/workbox-sw.js"
);
workbox.setConfig({ debug: false });
workbox.routing.registerRoute(
({ request }) => request.destination === "image",
new workbox.strategies.NetworkFirst()
);