mirror of
https://github.com/derf/travelynx
synced 2024-12-11 21:42:38 +00:00
use versioning for service worker and web app manifest
This commit is contained in:
parent
5178e58c0c
commit
cdbb3ee45b
4 changed files with 16 additions and 16 deletions
|
@ -1,12 +1,12 @@
|
||||||
const CACHE_NAME = 'static-cache-v10';
|
const CACHE_NAME = 'static-cache-v11';
|
||||||
const FILES_TO_CACHE = [
|
const FILES_TO_CACHE = [
|
||||||
'/offline.html',
|
'/offline.html',
|
||||||
'/static/v10/css/materialize.min.css',
|
'/static/v11/css/materialize.min.css',
|
||||||
'/static/v10/css/material-icons.css',
|
'/static/v11/css/material-icons.css',
|
||||||
'/static/v10/css/local.css',
|
'/static/v11/css/local.css',
|
||||||
'/static/v10/js/jquery-2.2.4.min.js',
|
'/static/v11/js/jquery-2.2.4.min.js',
|
||||||
'/static/v10/js/materialize.min.js',
|
'/static/v11/js/materialize.min.js',
|
||||||
'/static/v10/js/travelynx-actions.min.js',
|
'/static/v11/js/travelynx-actions.min.js',
|
||||||
];
|
];
|
||||||
|
|
||||||
self.addEventListener('install', (evt) => {
|
self.addEventListener('install', (evt) => {
|
||||||
|
|
|
@ -3,27 +3,27 @@
|
||||||
"short_name": "travelynx",
|
"short_name": "travelynx",
|
||||||
"scope": "/",
|
"scope": "/",
|
||||||
"icons": [{
|
"icons": [{
|
||||||
"src": "/static/icons/icon-128x128.png",
|
"src": "/static/v11/icons/icon-128x128.png",
|
||||||
"sizes": "128x128",
|
"sizes": "128x128",
|
||||||
"type": "image/png"
|
"type": "image/png"
|
||||||
}, {
|
}, {
|
||||||
"src": "/static/icons/icon-144x144.png",
|
"src": "/static/v11/icons/icon-144x144.png",
|
||||||
"sizes": "144x144",
|
"sizes": "144x144",
|
||||||
"type": "image/png"
|
"type": "image/png"
|
||||||
}, {
|
}, {
|
||||||
"src": "/static/icons/icon-152x152.png",
|
"src": "/static/v11/icons/icon-152x152.png",
|
||||||
"sizes": "152x152",
|
"sizes": "152x152",
|
||||||
"type": "image/png"
|
"type": "image/png"
|
||||||
}, {
|
}, {
|
||||||
"src": "/static/icons/icon-192x192.png",
|
"src": "/static/v11/icons/icon-192x192.png",
|
||||||
"sizes": "192x192",
|
"sizes": "192x192",
|
||||||
"type": "image/png"
|
"type": "image/png"
|
||||||
}, {
|
}, {
|
||||||
"src": "/static/icons/icon-256x256.png",
|
"src": "/static/v11/icons/icon-256x256.png",
|
||||||
"sizes": "256x256",
|
"sizes": "256x256",
|
||||||
"type": "image/png"
|
"type": "image/png"
|
||||||
}, {
|
}, {
|
||||||
"src": "/static/icons/icon-512x512.png",
|
"src": "/static/v11/icons/icon-512x512.png",
|
||||||
"sizes": "512x512",
|
"sizes": "512x512",
|
||||||
"type": "image/png"
|
"type": "image/png"
|
||||||
}],
|
}],
|
||||||
|
|
|
@ -8,9 +8,9 @@
|
||||||
<meta name="apple-mobile-web-app-capable" content="yes">
|
<meta name="apple-mobile-web-app-capable" content="yes">
|
||||||
<meta name="apple-mobile-web-app-status-bar-style" content="black">
|
<meta name="apple-mobile-web-app-status-bar-style" content="black">
|
||||||
<meta name="apple-mobile-web-app-title" content="Weather PWA">
|
<meta name="apple-mobile-web-app-title" content="Weather PWA">
|
||||||
<link rel="apple-touch-icon" href="/static/icons/icon-152x152.png">
|
% my $av = 'v11'; # asset version
|
||||||
<link rel="manifest" href="/static/manifest.json">
|
<link rel="apple-touch-icon" href="/static/<%= $av %>/icons/icon-152x152.png">
|
||||||
% my $av = 'v10'; # asset version
|
<link rel="manifest" href="/static/<%= $av %>/manifest.json">
|
||||||
%= stylesheet "/static/${av}/css/materialize.min.css"
|
%= stylesheet "/static/${av}/css/materialize.min.css"
|
||||||
%= stylesheet "/static/${av}/css/material-icons.css"
|
%= stylesheet "/static/${av}/css/material-icons.css"
|
||||||
%= stylesheet "/static/${av}/css/local.css"
|
%= stylesheet "/static/${av}/css/local.css"
|
||||||
|
|
Loading…
Reference in a new issue