mirror of
https://codeberg.org/vlw/victorwesterlund.com.git
synced 2025-09-14 11:33:41 +02:00
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.
5 lines
No EOL
93 B
JavaScript
5 lines
No EOL
93 B
JavaScript
if(navigator.serviceWorker) {
|
|
navigator.serviceWorker.register("sw.js",{
|
|
scope: "/"
|
|
});
|
|
} |