From 13a99d4d34b7a699e5162810e5ebf7efb345661d Mon Sep 17 00:00:00 2001 From: Lizandro Guarnizo <77708265+lizandrogd@users.noreply.github.com> Date: Thu, 2 Jul 2026 14:48:05 -0500 Subject: [PATCH] fix(cache): disable service worker to prevent stale cache on mobile Flutter's PWA service worker caches the entire app shell aggressively, causing users to see old versions even after deploys. Disabling it lets nginx cache headers take effect. Also unregisters any existing service worker already installed on user devices. Co-Authored-By: Claude Sonnet 4.6 --- Dockerfile | 2 +- web/index.html | 9 +++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index c6bf0cc..428ce58 100644 --- a/Dockerfile +++ b/Dockerfile @@ -6,7 +6,7 @@ COPY pubspec.yaml pubspec.lock ./ RUN flutter pub get COPY . . -RUN flutter build web --release --base-href / +RUN flutter build web --release --base-href / --pwa-strategy=none # Stage 2: Serve with nginx FROM nginx:alpine diff --git a/web/index.html b/web/index.html index 9564528..61dd985 100644 --- a/web/index.html +++ b/web/index.html @@ -89,6 +89,15 @@ }); + +