Skip to content

PB-1827: change service-worker strategy to network first#1376

Merged
pakb merged 1 commit intodevelopfrom
fix-PB-1827-change-service-worker-strategy
Jul 10, 2025
Merged

PB-1827: change service-worker strategy to network first#1376
pakb merged 1 commit intodevelopfrom
fix-PB-1827-change-service-worker-strategy

Conversation

@pakb
Copy link
Contributor

@pakb pakb commented Jul 9, 2025

and trying to keep the fix for Firefox print working

Network first means the Service-Worker will attempt to load the resource online regardless of the cache status, and if the network responds it will update the cache with the new answer.
We need a good e2e test coverage (with something like Playwright) to be confident enough to change the strategy back to StaleWhileRevalidate

Giving a full URL to the "Manifest generation function" is a bad idea, and the service worker isn't loading anymore, reverting to relative index.html path, and editing the API print regex to match a regex found in the VitePWA documentation

Adding a "BETA" badge to the feature, to have a better "expectation management" and signify that this could have some bugs still.

Test link

@github-actions github-actions bot added the bug label Jul 9, 2025
@pakb pakb force-pushed the fix-PB-1827-change-service-worker-strategy branch from 0864a19 to 278854c Compare July 9, 2025 05:31
@cypress
Copy link

cypress bot commented Jul 9, 2025

web-mapviewer    Run #5519

Run Properties:  status check passed Passed #5519  •  git commit 70179c829b: PB-1827: change service-worker strategy to network first
Project web-mapviewer
Branch Review fix-PB-1827-change-service-worker-strategy
Run status status check passed Passed #5519
Run duration 05m 31s
Commit git commit 70179c829b: PB-1827: change service-worker strategy to network first
Committer Pascal Barth
View all properties for this run ↗︎

Test results
Tests that failed  Failures 0
Tests that were flaky  Flaky 0
Tests that did not run due to a developer annotating a test with .skip  Pending 20
Tests that did not run due to a failure in a mocha hook  Skipped 0
Tests that passed  Passing 254
View all changes introduced in this branch ↗︎

@pakb pakb force-pushed the fix-PB-1827-change-service-worker-strategy branch 6 times, most recently from 41530ce to e211f32 Compare July 10, 2025 06:06
@pakb pakb requested review from ismailsunni, ltkum and sommerfe July 10, 2025 06:07
Copy link
Contributor

@ismailsunni ismailsunni left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code seems good to me

and trying to keep the fix for Firefox print working

Network first means the Service-Worker will attempt to load the resource online regardless of the cache status, and if the network responds it will update the cache with the new answer.
We need a good e2e test coverage (with something like Playwright) to be confident enough to change the strategy back to StaleWhileRevalidate

Giving a full URL to the "Manifest generation function" is a bad idea, and the service worker isn't loading anymore, reverting to relative `index.html` path, and editing the API print regex to match a regex found in the VitePWA documentation

Adding a "BETA" badge to the feature, to have a better "expectation management" and signify that this could have some bugs still.
@pakb pakb force-pushed the fix-PB-1827-change-service-worker-strategy branch from e211f32 to 70179c8 Compare July 10, 2025 07:29
@pakb pakb merged commit 0567305 into develop Jul 10, 2025
6 checks passed
@pakb pakb deleted the fix-PB-1827-change-service-worker-strategy branch July 10, 2025 07:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants