ECommerce Ordini Email 1

This commit is contained in:
Paolo Arena
2021-03-30 02:21:59 +02:00
parent fada2ec2be
commit 8ae63c3357
9 changed files with 63 additions and 5 deletions

View File

@@ -6,7 +6,7 @@
// Questo è il swSrc
console.log(' [ VER-0.0.62 ] _---------________------ PAO: this is my custom service worker');
console.log(' [ VER-0.0.83 ] _---------________------ PAO: this is my custom service worker');
importScripts('../statics/js/idb.js');
importScripts('../statics/js/storage.js');
@@ -23,7 +23,7 @@ if (self.location.hostname.startsWith('test')) {
const cfgenv = {
serverweb: self.location.protocol + "//" + self.location.hostname + ':' + port,
dbname: 'mydb3',
dbversion: 11,
dbversion: 12,
}
// console.log('serverweb', cfgenv.serverweb)
@@ -221,7 +221,11 @@ if (workbox) {
}
workbox.routing.registerRoute(function (routeData) {
return (routeData.event.request.headers.get('accept').includes('text/html'));
const myaccept = routeData.event.request.headers.get('accept')
if (myaccept)
return (myaccept.includes('text/html'));
else
return null
}, function (args) {
return caches.match(args.event.request)
.then(function (response) {