-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixing SW: first time and hard refreshing (#110)
Two cases here: * app first load: the script try to fetch on 'swfs/init' to get the clientId but without waiting to be sure that the SW is fully activated (ie. `serviceWorker.state = 'activated'`). * hard refresh: when calling for a hard refresh the browser behavior is to remove the page from the SW control, so `navigator.serviceWorker.controller` is `null`. The page has to call the SW and ask him to claim the page. Both issue are fixed by this issue.
- Loading branch information
1 parent
79b8cda
commit 5f49bb0
Showing
4 changed files
with
33 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters