You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I wonder if this should also control whether we serve the Offline page and the Server Error page.
This was not implemented in #365 but after thinking about it more, it seems the right way to go. Furthermore, the service worker should only ever be installed if there is any SW logic registered to run in it. So if the offline/error page is included with offline browsing, and offline browsing is not enabled, then there would be no SW logic registered and the SW should be skipped from being installed. As soon as that checkbox is enabled or if a plugin registers a script to run in the service worker, then the SW would then be installed automatically.
There probably needs to be a new conditional function added to check whether the SW is being installed.
By not installing the service worker by default, we'll avoid situations where the SW is responding to requests unexpectedly, which can cause confusion. It will also reduce extraneous SW installation across the web, reducing the service workers that are installed but aren't doing anything much of value.