victorwesterlund.com/public/assets/js/script.js
Victor Westerlund 1e762a65ea Removed caching of subdirectories
Subdirectories with the exception of /assets/ will not get cached by the Service Worker. A normal network fetch() will be executed.

Added scope to Service Worker register.

Added "fetchContent()" which performs a normal network fetch() and follows redirects.
2020-12-15 14:46:41 +01:00

5 lines
No EOL
93 B
JavaScript

if(navigator.serviceWorker) {
navigator.serviceWorker.register("sw.js",{
scope: "/"
});
}