|
@@ -39,14 +39,14 @@ export function createRouterGuards(router: Router) {
|
|
|
: ('音乐数字课堂' as string);
|
|
|
}
|
|
|
|
|
|
- // if ('serviceWorker' in navigator) {
|
|
|
- // console.log(caches.keys(), 'caches.keys()');
|
|
|
- // caches.keys().then(function (cacheNames) {
|
|
|
- // cacheNames.forEach(function (cacheName) {
|
|
|
- // caches.delete(cacheName);
|
|
|
- // });
|
|
|
- // });
|
|
|
- // }
|
|
|
+ if ('serviceWorker' in navigator) {
|
|
|
+ // console.log(caches.keys(), 'caches.keys()');
|
|
|
+ caches.keys().then(function (cacheNames) {
|
|
|
+ cacheNames.forEach(function (cacheName) {
|
|
|
+ caches.delete(cacheName);
|
|
|
+ });
|
|
|
+ });
|
|
|
+ }
|
|
|
if (!isChrome()) {
|
|
|
return;
|
|
|
}
|