- From: Hakuno <notifications@github.com>
- Date: Wed, 10 Aug 2016 11:48:51 -0700
- To: slightlyoff/ServiceWorker <ServiceWorker@noreply.github.com>
Received on Wednesday, 10 August 2016 18:49:18 UTC
Hey there!
My Firefox version 48 runs service workers. But, I've already noticed the Chrome sounds better.
Because Firefox just puts a new one cache version. And old cache versions are left. I can verify it by executing on console:
`caches.keys().then(function(cacheNames) { console.log(cacheNames) })`
They don't go away on Firefox. Even although Chrome works well.
And it's my activate event function below:
`self.addEventListener('activate', function(event) {`
`var cacheWhitelist = ['xxxxxxxx'];`
` event.waitUntil(`
` self.caches.keys().then(function(cacheNames) {`
` return Promise.all(`
` cacheNames.filter(function (cacheName) {`
` return (cacheWhitelist.indexOf(cacheName) === -1);`
` })`
` .map(function (key) {`
` return self.caches.delete(key);`
` })`
` );`
` })`
` );`
`});`
How could I make it works properly?
Thanks in advance.
---
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/slightlyoff/ServiceWorker/issues/948
Received on Wednesday, 10 August 2016 18:49:18 UTC