Advertisement
Guest User

Untitled

a guest
Aug 17th, 2019
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.45 KB | None | 0 0
  1. self.addEventListener('activate',
  2. function(event) {
  3. event.waitUntil(
  4. caches.keys().then(function(cacheNames)
  5. {
  6. return Promise.all(
  7.  
  8. cacheNames.filter(function(cacheName) {
  9. // Return true if you want to remove this cache,
  10. // but remember that caches are shared across
  11. // the whole origin
  12. }).map(function(cacheName) {
  13. return caches.delete(cacheName);
  14. })
  15. );
  16. })
  17. );
  18. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement