fix "Todo Completati"

statics instead of assets
This commit is contained in:
Paolo Arena
2019-03-05 23:44:48 +01:00
parent 6686e44297
commit 41edd96c8c
35 changed files with 184 additions and 2983 deletions

View File

@@ -8,8 +8,8 @@
console.log(' [ VER-0.0.27 ] _---------________------ PAO: this is my custom service worker');
importScripts('../assets/js/idb.js');
importScripts('../assets/js/storage.js');
importScripts('../statics/js/idb.js');
importScripts('../statics/js/storage.js');
importScripts('https://storage.googleapis.com/workbox-cdn/releases/3.0.0/workbox-sw.js'); //++Todo: Replace with local workbox.js
@@ -206,7 +206,7 @@ if (workbox) {
});
workbox.routing.registerRoute(
new RegExp(/.*\/(?:assets\/icons).*$/),
new RegExp(/.*\/(?:statics\/icons).*$/),
workbox.strategies.cacheFirst({
cacheName: 'image-cache',
plugins: [
@@ -258,9 +258,9 @@ if (workbox) {
);
workbox.routing.registerRoute(
new RegExp(/.*\/(?:assets).*$/),
new RegExp(/.*\/(?:statics).*$/),
workbox.strategies.cacheFirst({
cacheName: 'assets',
cacheName: 'statics',
plugins: [
new workbox.expiration.Plugin({
maxAgeSeconds: 10 * 24 * 60 * 60,