diff options
author | Andrew Dolgov <[email protected]> | 2017-06-29 12:54:06 +0300 |
---|---|---|
committer | Andrew Dolgov <[email protected]> | 2017-06-29 12:54:06 +0300 |
commit | 131e407e1bdbc6fd9e51d8bf695610d5676e6f66 (patch) | |
tree | 9b90fdcb33351e003d75150f0669c5a446a9443e | |
parent | f25abeb922eb5359d83fdf9068eb8d1a616fffbd (diff) |
manual cache refresh: remove nonexistant data
-rw-r--r-- | worker.js | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -47,6 +47,8 @@ self.addEventListener('message', function(event){ fetch(keys[i]).then(function(resp) { if (resp.status == 200) { cache.put(resp.url, resp); + } else if (resp.status != 401) { + cache.delete(resp.url); } }); |