Created
June 20, 2023 06:28
-
-
Save YonatanKra/af121427a00b336ea0a93df685cdf764 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const enableNavigationPreload = async () => { | |
if (self.registration.navigationPreload) { | |
await self.registration.navigationPreload.enable(); | |
} | |
}; | |
self.addEventListener('activate', (event) => { | |
event.waitUntil(enableNavigationPreload()); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment