Created
December 14, 2017 17:58
-
-
Save edoardocavazza/b7051e6f45ad2203cad3c7be2c50df74 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
// intercept network requests | |
this.addEventListener('fetch', (event) => { | |
// check if `event.request` è un file js | |
if (event.request.url.match(/.js$/)) { | |
event.respondWith( | |
// -> handle del file js | |
); | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment