Guest User

Untitled

a guest
Feb 17th, 2019
93
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.29 KB | None | 0 0
  1. self.addEventListener('fetch', async (event) => {
  2. event.respondWith(
  3. fetch(event.request)
  4. .then(response => {
  5. return response;
  6. },
  7. error => {
  8. return caches.match(event.request)
  9. })
  10. .then(response => {
  11. return response;
  12. })
  13. )
  14. });
Add Comment
Please, Sign In to add comment