Repository navigation
[WEB] ☂️ Web Cache invalidation based on pubspec.yaml version #149031
Copy link
Copy link
Open
4 / 64 of 6 issues completedOpen
4 / 64 of 6 issues completed
Copy link
Labels
P2Important issues not at the top of the work listImportant issues not at the top of the work listcustomer: acdccustomer: crowdAffects or could affect many people, though not necessarily a specific customer.Affects or could affect many people, though not necessarily a specific customer.found in release: 3.22Found to occur in 3.22Found to occur in 3.22found in release: 3.23Found to occur in 3.23Found to occur in 3.23has reproducible stepsThe issue has been confirmed reproducible and is ready to work onThe issue has been confirmed reproducible and is ready to work onplatform-webWeb applications specificallyWeb applications specificallyteam-webOwned by Web platform teamOwned by Web platform teamtoolAffects the "flutter" command-line tool. See also t: labels.Affects the "flutter" command-line tool. See also t: labels.triaged-webTriaged by Web platform teamTriaged by Web platform teamworkaround availableThere is a workaround available to overcome the issueThere is a workaround available to overcome the issue
Description
Steps to reproduce
- Deploy Flutter Web application.
- Update version in the pubspec.yaml.
- Deploy Flutter Web application again.
- Web browser will display old application even after F5 press (Reload page)
Expected results
Web browser should display new application after F5 press (Reload page)
Actual results
Web browser will display old application even after F5 press (Reload page)
Relevant issue: #63500
Temporary workaround: https://medium.com/@zs-dima/flutter-web-new-website-version-is-available-press-update-to-refresh-81b778d6a4fd
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
P2Important issues not at the top of the work listImportant issues not at the top of the work listcustomer: acdccustomer: crowdAffects or could affect many people, though not necessarily a specific customer.Affects or could affect many people, though not necessarily a specific customer.found in release: 3.22Found to occur in 3.22Found to occur in 3.22found in release: 3.23Found to occur in 3.23Found to occur in 3.23has reproducible stepsThe issue has been confirmed reproducible and is ready to work onThe issue has been confirmed reproducible and is ready to work onplatform-webWeb applications specificallyWeb applications specificallyteam-webOwned by Web platform teamOwned by Web platform teamtoolAffects the "flutter" command-line tool. See also t: labels.Affects the "flutter" command-line tool. See also t: labels.triaged-webTriaged by Web platform teamTriaged by Web platform teamworkaround availableThere is a workaround available to overcome the issueThere is a workaround available to overcome the issue
Activity
[-][WEB] Web Cache invalidation based on pubspec.yaml version[/-][+][BUG] [WEB] Web Cache invalidation based on pubspec.yaml version[/+]huycozy commentedon May 24, 2024
Hi @zs-dima, just to confirm the actual result. Will the page show the new content or will the page never be updated after several time refreshes the browser?
Also, on my end, when I check this on Flutter stable 3.22.1, the page will display the new content after I refresh the browser a few times (1, 2, or 3 times...it's not fixed). But on the latest master channel, the page display new content right after one time refresh the browser. Could you re-check this on Flutter master channel?
flutter doctor -v (stable and master)
[✓] Flutter (Channel stable, 3.22.1, on macOS 14.1 23B74 darwin-x64, locale en-VN) • Flutter version 3.22.1 on channel stable at /Users/huynq/Documents/GitHub/flutter • Upstream repository https://github.com/flutter/flutter.git • Framework revision a14f74ff3a (11 hours ago), 2024-05-22 11:08:21 -0500 • Engine revision 55eae6864b • Dart version 3.4.1 • DevTools version 2.34.3 [✓] Android toolchain - develop for Android devices (Android SDK version 34.0.0) • Android SDK at /Users/huynq/Library/Android/sdk • Platform android-34, build-tools 34.0.0 • ANDROID_HOME = /Users/huynq/Library/Android/sdk • Java binary at: /Applications/Android Studio.app/Contents/jbr/Contents/Home/bin/java • Java version OpenJDK Runtime Environment (build 17.0.9+0-17.0.9b1087.7-11185874) • All Android licenses accepted. [✓] Xcode - develop for iOS and macOS (Xcode 15.3) • Xcode at /Applications/Xcode15.3.app/Contents/Developer • Build 15E204a • CocoaPods version 1.15.2 [✓] Chrome - develop for the web • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome [✓] Android Studio (version 2023.2) • Android Studio at /Applications/Android Studio.app/Contents • Flutter plugin can be installed from: 🔨 https://plugins.jetbrains.com/plugin/9212-flutter • Dart plugin can be installed from: 🔨 https://plugins.jetbrains.com/plugin/6351-dart • android-studio-dir = /Applications/Android Studio.app/ • Java version OpenJDK Runtime Environment (build 17.0.9+0-17.0.9b1087.7-11185874) [✓] VS Code (version 1.89.1) • VS Code at /Applications/Visual Studio Code.app/Contents • Flutter extension version 3.88.0 [✓] Connected device (2 available) • macOS (desktop) • macos • darwin-x64 • macOS 14.1 23B74 darwin-x64 • Chrome (web) • chrome • web-javascript • Google Chrome 125.0.6422.76 [✓] Network resources • All expected network resources are available. • No issues found!zs-dima commentedon May 24, 2024
@huycozy thanks a lot for looking into.
zs-dima commentedon May 24, 2024
slavap commentedon May 25, 2024
@huycozy
Hope it will be FIXED at last, and we don't have to wait 4 more years and end up closing it just because of author frustration.
The original issue's priority was P2 and nothing was done for years, so the priority for this descendant issue has to be P1 or P0.
Workarounds which work for me are mentioned here: #63500 (comment)
huycozy commentedon May 27, 2024
I can reproduce this issue on a new Flutter project on both stable and master channels. It needs to be activated at least twice (press the refresh page button on browser) to see updates.
Since #63500 has been closed, I will label this as a new one.
flutter doctor -v (stable and master)
[✓] Flutter (Channel stable, 3.22.1, on macOS 14.1 23B74 darwin-x64, locale en-VN) • Flutter version 3.22.1 on channel stable at /Users/huynq/Documents/GitHub/flutter • Upstream repository https://github.com/flutter/flutter.git • Framework revision a14f74ff3a (11 hours ago), 2024-05-22 11:08:21 -0500 • Engine revision 55eae6864b • Dart version 3.4.1 • DevTools version 2.34.3 [✓] Android toolchain - develop for Android devices (Android SDK version 34.0.0) • Android SDK at /Users/huynq/Library/Android/sdk • Platform android-34, build-tools 34.0.0 • ANDROID_HOME = /Users/huynq/Library/Android/sdk • Java binary at: /Applications/Android Studio.app/Contents/jbr/Contents/Home/bin/java • Java version OpenJDK Runtime Environment (build 17.0.9+0-17.0.9b1087.7-11185874) • All Android licenses accepted. [✓] Xcode - develop for iOS and macOS (Xcode 15.3) • Xcode at /Applications/Xcode15.3.app/Contents/Developer • Build 15E204a • CocoaPods version 1.15.2 [✓] Chrome - develop for the web • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome [✓] Android Studio (version 2023.2) • Android Studio at /Applications/Android Studio.app/Contents • Flutter plugin can be installed from: 🔨 https://plugins.jetbrains.com/plugin/9212-flutter • Dart plugin can be installed from: 🔨 https://plugins.jetbrains.com/plugin/6351-dart • android-studio-dir = /Applications/Android Studio.app/ • Java version OpenJDK Runtime Environment (build 17.0.9+0-17.0.9b1087.7-11185874) [✓] VS Code (version 1.89.1) • VS Code at /Applications/Visual Studio Code.app/Contents • Flutter extension version 3.88.0 [✓] Connected device (2 available) • macOS (desktop) • macos • darwin-x64 • macOS 14.1 23B74 darwin-x64 • Chrome (web) • chrome • web-javascript • Google Chrome 125.0.6422.76 [✓] Network resources • All expected network resources are available. • No issues found!115 remaining items
feat(web): support --web-content-hash for entrypoint files
kevmoo commentedon Aug 27, 2026
Umbrella Roadmap: Content-Hashed Web Output & Cache Busting
Following the removal of default built-in service worker generation (#156910), we are delivering first-party, content-hashed output filenames (
--web-content-hash) across Flutter Web to enable reliable browser cache invalidation and long-termCache-Control: public, max-age=31536000, immutableheaders.👉 See the
Sub-issueslist at the top of this issue for live status and linked pull requests across all delivery phases.[-][WEB] Web Cache invalidation based on pubspec.yaml version[/-][+][WEB] ☂️ Web Cache invalidation based on pubspec.yaml version[/+]feat(web): support --web-content-hash for entrypoint files (flutter#1…
feat(web): support --web-content-hash for physical static assets (flu…
feat(web): emit precache_manifest.json when --web-content-hash is ena…
feat(web): emit precache_manifest.json when --web-content-hash is ena…
feat(web): resolve raw asset keys via content-hashed manifests and un…
fix(web): hash source maps before rewriting sourceMappingURL with --w…