Vuepress: [Bug report] serviceWorker turns to `false` can't work

Created on 18 Aug 2018  路  4Comments  路  Source: vuejs/vuepress

Bug report

Once I set serviceWorker to true, then I find out offline mode is not appropriate to my documents. So I turns serviceWorker to false, but it doesn't work.

Version

0.14.2

Steps to reproduce

First, set serviceWorker to true and release.
Second , set serviceWorker to false and release again.

What is expected?

The browser clear the cache according to the document config.base, then unregister service worker according to the config.base too.

What is actually happening?

The document still request the service-worker.js from the CDN which I can't delete.

Other relevant information

  • Your OS: macOS Sierra 10.12.6
  • Node.js version: v8.11.3
  • Browser version: chrome 68.0.3440.106
  • Is this a global or local install? global
  • Which package manager did you use for the install? yarn
feature request next

Most helpful comment

In fact, we can also support a feature of unregistering sw when sw was set to false but we detected a existing sw.

All 4 comments

Of course, this request wasn't sent by your newest code. since you have a previous serviceWorker installed, you should unregister the previous serviceWorker manually.

  • Click the unregister:

image

In fact, we can also support a feature of unregistering sw when sw was set to false but we detected a existing sw.

Hey, is this still not working (considering the issue is "Open")?

We've recently removed PWA from our site but all users are stuck in a limbo of old content which won't get changed with newer commits.

Is there a way for us to unregister SW for everyone? Would I need to add back PWA plugin and set it to false instead of having it removed completely?

Sincerely, Soitora

Hey, is this still not working (considering the issue is "Open")?

We've recently removed PWA from our site but all users are stuck in a limbo of old content which won't get changed with newer commits.

Is there a way for us to unregister SW for everyone? Would I need to add back PWA plugin and set it to false instead of having it removed completely?

Sincerely, Soitora

It's working and I should close this issue.
I think that you should add back PWA plugin and set it to false, otherwise old SW script is still working and website can't update.

Was this page helpful?
0 / 5 - 0 ratings