diff options
author | Daniel Friesel <derf@finalrewind.org> | 2019-05-03 21:02:24 +0200 |
---|---|---|
committer | Daniel Friesel <derf@finalrewind.org> | 2019-05-03 21:02:24 +0200 |
commit | cdbb3ee45bade7dbd8158b04dec766bf6f01e8cf (patch) | |
tree | eb1bb9493687e00af22da87aa5fa8c3ef8708496 | |
parent | 5178e58c0ceb59d46dc3dfca59d8f35edb4791b3 (diff) |
use versioning for service worker and web app manifest
-rw-r--r-- | public/service-worker.js | 14 | ||||
-rw-r--r-- | public/static/manifest.json | 12 | ||||
l--------- | public/static/v11 (renamed from public/static/v9) | 0 | ||||
-rw-r--r-- | templates/layouts/default.html.ep | 6 |
4 files changed, 16 insertions, 16 deletions
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 index 945c9b4..945c9b4 120000 --- a/public/static/v9 +++ b/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 @@ <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-title" content="Weather PWA"> - <link rel="apple-touch-icon" href="/static/icons/icon-152x152.png"> - <link rel="manifest" href="/static/manifest.json"> - % my $av = 'v10'; # asset version + % my $av = 'v11'; # asset version + <link rel="apple-touch-icon" href="/static/<%= $av %>/icons/icon-152x152.png"> + <link rel="manifest" href="/static/<%= $av %>/manifest.json"> %= stylesheet "/static/${av}/css/materialize.min.css" %= stylesheet "/static/${av}/css/material-icons.css" %= stylesheet "/static/${av}/css/local.css" |