Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix broken ServiceWorker when switching between modes. #423

Merged
merged 1 commit into from
Sep 22, 2018

Conversation

mossroy
Copy link
Contributor

@mossroy mossroy commented Sep 22, 2018

This should finally fix #145

@Jaifroid
Copy link
Member

Jaifroid commented Sep 22, 2018

I've tested this on Edge, but don't see any change in behaviour, but then after the stability fix I wasn't getting a broken Service Worker when switching between SW and jQuery when running from localhost.

When running with the file:// protocol (which doesn't of course support Service Worker), I still get the following issue at least in Edge: if I click on Service Worker mode, the system allows me to select the mode (giving the usual warning that will be eliminated with #422 ), and doesn't then give a warning that the mode is unusable, even though the first API status is orange, and Service Worker remains selected. Now, if I try to load a file (or if a file was already loaded, navigate to a page) it of course doesn't work. If I now go to "Configure" and switch back to jQuery mode, the app gets into an unusable state. I cannot search (no results), the Random button appears to find a page but never displays it, and clicking on Home produces a blank page.

N.B. The above is not specific to this PR, so I should report it elsewhere now that we're removing the warning about Service Worker mode, but thought it might be easily fixable if you recognize these symptoms? Will check other browsers shortly.

@Jaifroid
Copy link
Member

Just tested on Firefox Quantum and Chromium:

  • On Chromium, I get exactly the same behaviour as in Edge, i.e. a broken app after switching back from Service Worker mode when using the file:// protocol.

  • On Firefox Quantum, it also allows me to turn on Service Worker mode even though the first API status is orange. I cannot load a page of course. However, switching back to jQuery mode allows the app to continue functioning as normal. Is this what you fixed in this PR? If so, the fix only works in Firefox.

@mossroy
Copy link
Contributor Author

mossroy commented Sep 22, 2018

The problems you mention should be fixed by #424 , not by this PR.
This PR fixes an unstability when switching between jQuery and SW modes in a context where both modes are fully supported

@Jaifroid
Copy link
Member

OK, I didn't notice that instability since the previous SW fix. I'll add my report to #424.

@mossroy mossroy merged commit 971da81 into master Sep 22, 2018
@mossroy mossroy deleted the fix-jquery-sw-modes-switch branch September 22, 2018 10:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants