Retire stale WebUI service workers on startup - #257
Merged
0xShug0 merged 2 commits intoAug 16, 2026
Conversation
mirek190
marked this pull request as ready for review
August 16, 2026 20:36
Owner
|
Merged! Thanks! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fix the embedded Native WebUI remaining stuck on a previously installed application when audio.cpp reuses the same local origin, commonly
http://127.0.0.1:8080.In short - If you had other webpage on http://127.0.0.1 and port 8080 loaded before the cache was not released and you could nor see Audio.cpp Studio on working server until you do not clean cache manually.
Root cause
A prior llama.cpp WebUI registered a root-scoped
/sw.jsWorkbox service worker. That worker continued serving its cached application shell before requests reachedaudiocpp_server, so normal Edge sessions displayed the old UI while InPrivate sessions correctly displayed Native Studio. Ordinary HTTP cache headers alone cannot retire a service worker that intercepts the navigation first.Changes
Clear-Site-Data: cachefor the embedded UI shell./sw.jsand/service-worker.jswhen the UI is enabled.localStorageand IndexedDB so saved voices, model-folder selection, language, and UI preferences survive.Validation
npm run check: 0 errors and 0 warnings.npm run build: successful static Native Studio build.audiocpp_serverbuild: successful./returnsCache-Control: no-store, no-cache, must-revalidate, max-age=0andClear-Site-Data: cache./sw.jsreturns the no-store retirement worker with root service-worker scope.localStoragepreference remained intact; no service-worker registrations remained./sw.jsand Workbox cache; reopening127.0.0.1:8080automatically recovered toaudio.cpp · Native Studio. InPrivate mode was not required.