Skip to content

Conversation

AntoLC
Copy link
Collaborator

@AntoLC AntoLC commented Oct 17, 2025

Purpose

When a new service worker is installed, the page was reloaded to ensure the new service worker took control over the previous one, it is not a big issue in normal browsing mode because the service worker is only updated once in a while (every release).
However, in incognito mode, the service worker has to be re-registered on each new session, which means that the page was reloading each time the user opened a new incognito window, creating a bad user experience.

Proposal

We now take in consideration the case where the service-worker is installed for the first time, and don't reload if it is this case.

@AntoLC AntoLC self-assigned this Oct 17, 2025
@AntoLC AntoLC added frontend SW Service worker labels Oct 17, 2025
When a new service worker is installed, the page
was reloaded to ensure the new service worker took
control, it is not a big issue in normal browsing mode
because the service worker is only updated once in a
while (every release).
However, in incognito mode, the service worker has to be
re-registered on each new session, which means that
the page was reloading each time the user opened a
new incognito window, creating a bad user experience.
We now take in consideration the case where the
service-worker is installed for the first time, and don't
reload if it is this case.
@AntoLC AntoLC force-pushed the fix/reload-page-install-sw branch from 73248de to 33647f1 Compare October 17, 2025 13:14
Copy link

github-actions bot commented Oct 17, 2025

Size Change: +60 B (0%)

Total Size: 3.66 MB

Filename Size Change
apps/impress/out/_next/static/4d5a422a/_buildManifest.js 0 B -882 B (removed) 🏆
apps/impress/out/_next/static/fd3ef7f4/_buildManifest.js 882 B +882 B (new file) 🆕

compressed-size-action

@AntoLC AntoLC requested a review from lunika October 17, 2025 13:19
@AntoLC AntoLC merged commit 33647f1 into main Oct 17, 2025
21 of 22 checks passed
@AntoLC AntoLC deleted the fix/reload-page-install-sw branch October 17, 2025 13:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

frontend SW Service worker

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants