From 10b247ae0561415e2b081bbc75e2565a7faf4be7 Mon Sep 17 00:00:00 2001 From: nyscherm Date: Fri, 18 May 2018 12:45:13 -0700 Subject: [PATCH] Improve sw updating Once sw update has installed and activated, clicking to another page will cause a hard refresh --- README.md | 4 ++++ public/site.webmanifest | 2 +- src/components/Html.js | 2 +- src/components/Link/Link.js | 7 ++++++- src/service-worker.js | 9 +++++---- 5 files changed, 17 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 99afd1786..1c864cc63 100644 --- a/README.md +++ b/README.md @@ -92,6 +92,10 @@ node build/server.js You can modify `tools/deploy.js` as needed to work with your deployment strategy. +## Service Worker + +To run the service worker locally, follow the above steps to run the production server. After testing the service worker, be sure to unregister the service worker in the browser (or close all local Lunch tabs) to avoid issues when testing on the development server. + ## Testing ### Unit tests diff --git a/public/site.webmanifest b/public/site.webmanifest index 4b8c7661e..6803af5fc 100644 --- a/public/site.webmanifest +++ b/public/site.webmanifest @@ -1,7 +1,7 @@ { "short_name": "Lunch", "name": "Lunch", - "description": "An app for groups to decide on nearby lunch options.", + "description": "A simple lunch voting app for you and your team. Search nearby restaurants, add them to your list, vote for as many as you like, and decide on today’s pick!", "icons": [ { "src": "icon.png", diff --git a/src/components/Html.js b/src/components/Html.js index 5a922484a..0d8630b1d 100644 --- a/src/components/Html.js +++ b/src/components/Html.js @@ -93,7 +93,7 @@ class Html extends Component {