Open zavelevsky opened 2 years ago
here are a few resources to help do a POC for this: https://vite-plugin-pwa.netlify.app/guide/periodic-sw-updates.html https://vite-plugin-pwa.netlify.app/guide/prompt-for-update.html#setup https://stackoverflow.com/questions/41903097/how-to-force-service-worker-to-update https://web.dev/learn/pwa/service-workers/#updating-a-service-worker https://laracasts.com/discuss/channels/javascript/how-to-clear-a-service-worker-cache-for-indexhtml-page
it seems that the service worker in the landing page is caching the site - thus preventing us from switching to another home page by means of DNS. We need to approach this carefully - and understand what's the correct way to update the service worker for existing users - with code that will change its caching strategy. The end result is that new visitors will see a new home page (hosted in unbounce), returning user will get this old homepage, and then their cache will be cleared and they will be able to be redirected to the new site.