🐛(service-worker) fix sw registration and page reload logic

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.
This commit is contained in:
Anthony LC
2025-10-17 15:14:04 +02:00
parent e339cda5c6
commit 33647f124f
2 changed files with 59 additions and 37 deletions

View File

@@ -6,6 +6,10 @@ and this project adheres to
## [Unreleased]
### Fixed
🐛(service-worker) fix sw registration and page reload logic #1500
## [3.8.1] - 2025-10-17
### Fixed