Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- self.addEventListener('fetch', async (event) => {
- event.respondWith(
- fetch(event.request)
- .then(response => {
- return response;
- },
- error => {
- return caches.match(event.request)
- })
- .then(response => {
- return response;
- })
- )
- });
Add Comment
Please, Sign In to add comment