showing results for - "add update react pwa feature"
Mateo
01 Jan 2017
1//This from url https://stackoverflow.com/questions/56972246/how-to-update-reactjs-based-pwa-to-the-new-version
2
3window.addEventListener('activate', function(event) {
4      event.waitUntil(
5          caches.keys().then(function(cacheNames) {
6              return Promise.all(
7                  cacheNames.filter(function(cacheName) {
8                      // Return true if you want to remove this cache,
9                      // but remember that caches are shared across
10                      // the whole origin
11                  }).map(function(cacheName) {
12                      return caches.delete(cacheName);
13                  })
14              );
15          })
16      );
17    });
18