Skip to content

How service worker registration, broadcast channel, and config are implemented #86

Answered by SgtPooki
2color asked this question in Q&A
Discussion options

You must be logged in to vote

@2color lots here, but I will try to address 1:1

Service worker registration

Why do we try to update right after registering the service worker?

IIRC, this is mostly to help with hot-reloading during development, making sure that changes are fully brought into the ServiceWorker. Also, this is a naive way to make sure we don't run into problems where folks are running the old version of the service worker across deployments. We may not need this, but during dev and initial build up, was easier to add and keep than remove and risk issues. This shouldn't have any visible impact in prod, but it could probably use some optimizations and ensuring we're following service worker best practices …

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by 2color
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #75 on March 05, 2024 10:57.