|
@@ -1,4 +1,4 @@
|
|
-const CACHE_NAME = 'MeeChat_v1.3';
|
|
|
|
|
|
+const CACHE_NAME = 'MeeChat_v1.3.1';
|
|
let urlsToCache = [];
|
|
let urlsToCache = [];
|
|
// let networkFirstList = ['', 'h5.html', 'mini.html'];
|
|
// let networkFirstList = ['', 'h5.html', 'mini.html'];
|
|
let networkFirstList = [];
|
|
let networkFirstList = [];
|
|
@@ -43,8 +43,7 @@ self.addEventListener('fetch', function (event) {
|
|
url = url.substr(0, pos)
|
|
url = url.substr(0, pos)
|
|
}
|
|
}
|
|
|
|
|
|
- let isNetworkFirst = url.endsWith('.html') || url.endsWith('.json');
|
|
|
|
- if (urlsToCache.indexOf(url) !== -1 && !isNetworkFirst) {
|
|
|
|
|
|
+ if (urlsToCache.indexOf(url) !== -1) {
|
|
return _cacheFirst(event)
|
|
return _cacheFirst(event)
|
|
} else {
|
|
} else {
|
|
return _networkFirst(event)
|
|
return _networkFirst(event)
|