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