diff options
author | Navan Chauhan <navanchauhan@gmail.com> | 2018-02-09 21:12:15 +0530 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-02-09 21:12:15 +0530 |
commit | c998d3b25002d982a61f540eb8a950837bf2ab73 (patch) | |
tree | 251887833e324fa7dffafbd7ad6bd07388985206 /sw.js | |
parent | f2fcbff04867c223d20baf04c580bd15ebc43584 (diff) |
Update sw.js
Diffstat (limited to 'sw.js')
-rw-r--r-- | sw.js | 10 |
1 files changed, 10 insertions, 0 deletions
@@ -35,4 +35,14 @@ self.addEventListener('fetch', function(event) { console.log(event.request.url); +event.respondWith( + +caches.match(event.request).then(function(response) { + +return response || fetch(event.request); + +}) + +); + }); |