From cdbb3ee45bade7dbd8158b04dec766bf6f01e8cf Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Fri, 3 May 2019 21:02:24 +0200 Subject: [PATCH] use versioning for service worker and web app manifest --- public/service-worker.js | 14 +++++++------- public/static/manifest.json | 12 ++++++------ public/static/{v9 => v11} | 0 templates/layouts/default.html.ep | 6 +++--- 4 files changed, 16 insertions(+), 16 deletions(-) rename public/static/{v9 => v11} (100%) diff --git a/public/service-worker.js b/public/service-worker.js index 2b5c556..6a9a05b 100644 --- a/public/service-worker.js +++ b/public/service-worker.js @@ -1,12 +1,12 @@ -const CACHE_NAME = 'static-cache-v10'; +const CACHE_NAME = 'static-cache-v11'; const FILES_TO_CACHE = [ '/offline.html', - '/static/v10/css/materialize.min.css', - '/static/v10/css/material-icons.css', - '/static/v10/css/local.css', - '/static/v10/js/jquery-2.2.4.min.js', - '/static/v10/js/materialize.min.js', - '/static/v10/js/travelynx-actions.min.js', + '/static/v11/css/materialize.min.css', + '/static/v11/css/material-icons.css', + '/static/v11/css/local.css', + '/static/v11/js/jquery-2.2.4.min.js', + '/static/v11/js/materialize.min.js', + '/static/v11/js/travelynx-actions.min.js', ]; self.addEventListener('install', (evt) => { diff --git a/public/static/manifest.json b/public/static/manifest.json index 09970d9..5607d87 100644 --- a/public/static/manifest.json +++ b/public/static/manifest.json @@ -3,27 +3,27 @@ "short_name": "travelynx", "scope": "/", "icons": [{ - "src": "/static/icons/icon-128x128.png", + "src": "/static/v11/icons/icon-128x128.png", "sizes": "128x128", "type": "image/png" }, { - "src": "/static/icons/icon-144x144.png", + "src": "/static/v11/icons/icon-144x144.png", "sizes": "144x144", "type": "image/png" }, { - "src": "/static/icons/icon-152x152.png", + "src": "/static/v11/icons/icon-152x152.png", "sizes": "152x152", "type": "image/png" }, { - "src": "/static/icons/icon-192x192.png", + "src": "/static/v11/icons/icon-192x192.png", "sizes": "192x192", "type": "image/png" }, { - "src": "/static/icons/icon-256x256.png", + "src": "/static/v11/icons/icon-256x256.png", "sizes": "256x256", "type": "image/png" }, { - "src": "/static/icons/icon-512x512.png", + "src": "/static/v11/icons/icon-512x512.png", "sizes": "512x512", "type": "image/png" }], diff --git a/public/static/v9 b/public/static/v11 similarity index 100% rename from public/static/v9 rename to public/static/v11 diff --git a/templates/layouts/default.html.ep b/templates/layouts/default.html.ep index c7f0847..8b81a5e 100644 --- a/templates/layouts/default.html.ep +++ b/templates/layouts/default.html.ep @@ -8,9 +8,9 @@ - - - % my $av = 'v10'; # asset version + % my $av = 'v11'; # asset version + + %= stylesheet "/static/${av}/css/materialize.min.css" %= stylesheet "/static/${av}/css/material-icons.css" %= stylesheet "/static/${av}/css/local.css"