-
-
Save samdbeckham/24bb10c44c5bde99753889a809dfeb49 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
/*global self: true */ | |
'use strict'; | |
self.addEventListener('fetch', event => { | |
const url = new URL(event.request.url); | |
if(url.pathname.endsWith('.png') | |
|| url.pathname.endsWith('.jpg')) { | |
event.respondWith( | |
fetch('./nickCage.jpg') | |
); | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment