Update Service Worker and Favicon (#3142)
* Update favicon * Update ServiceWorker with error logging
This commit is contained in:
parent
3188ddaa8a
commit
0af2a0a7dc
2 changed files with 4 additions and 3 deletions
|
|
@ -1,4 +1,4 @@
|
|||
var CACHE_VERSION = 'v2.7.0';
|
||||
var CACHE_VERSION = 'v2.7.1';
|
||||
var CACHE_NAME = CACHE_VERSION + ':sw-cache::';
|
||||
var REQUESTS_LIMIT = 40;
|
||||
|
||||
|
|
@ -49,7 +49,8 @@ function onFetch(event) {
|
|||
}
|
||||
return fetch(event.request)
|
||||
.then(fetchedFromNetwork)
|
||||
.catch(function fallback() {
|
||||
.catch(function fallback(err) {
|
||||
console.log(err)
|
||||
return cached || caches.match('/offline.html');
|
||||
})
|
||||
}
|
||||
|
|
@ -115,7 +116,7 @@ function onPush(event) {
|
|||
var title = 'DEV Connect 👋 ';
|
||||
var body = event.data.text();
|
||||
var icon = '<%= image_path "devlogo-pwa-128.png" %>';
|
||||
var tag = 'default-tag' + body;
|
||||
var tag = 'default-tag' + body;
|
||||
event.waitUntil(
|
||||
self.registration.showNotification(title, {
|
||||
body: body,
|
||||
|
|
|
|||
Binary file not shown.
|
Before Width: | Height: | Size: 0 B After Width: | Height: | Size: 2.2 KiB |
Loading…
Add table
Reference in a new issue