[Blazor WebAssembly standalone] Don't cache index.html during development - #59340
Merged
Conversation
MackinnonBuck
commented
Dec 5, 2024
| </ItemGroup> | ||
|
|
||
| <Message Importance="High" Text="Framework asset '%(_MissingFrameworkStaticWebAssetCandidate.Identity)' could not be found and won't be included in the project." /> | ||
| <Message |
Member
Author
There was a problem hiding this comment.
This is unrelated to the main fix - it was logging a message even when _MissingFrameworkStaticWebAssetCandidate was empty.
javiercn
approved these changes
Dec 5, 2024
Member
Author
|
/backport to release/9.0 |
Contributor
|
Started backporting to release/9.0: https://github.com/dotnet/aspnetcore/actions/runs/12188138898 |
Contributor
|
@MackinnonBuck backporting to release/9.0 failed, the patch most likely resulted in conflicts: $ git am --3way --empty=keep --ignore-whitespace --keep-non-patch changes.patch
Applying: Don't cache index.html when running via Dev Sever
Using index info to reconstruct a base tree...
A src/Assets/build/Microsoft.AspNetCore.App.Internal.Assets.targets
M src/Components/WebAssembly/DevServer/src/Server/Startup.cs
M src/Components/WebView/WebView/src/build/Microsoft.AspNetCore.Components.WebView.props
Falling back to patching base and 3-way merge...
Auto-merging src/Components/WebView/WebView/src/build/Microsoft.AspNetCore.Components.WebView.props
CONFLICT (content): Merge conflict in src/Components/WebView/WebView/src/build/Microsoft.AspNetCore.Components.WebView.props
Auto-merging src/Components/WebAssembly/DevServer/src/Server/Startup.cs
CONFLICT (modify/delete): src/Assets/build/Microsoft.AspNetCore.App.Internal.Assets.targets deleted in HEAD and modified in Don't cache index.html when running via Dev Sever. Version Don't cache index.html when running via Dev Sever of src/Assets/build/Microsoft.AspNetCore.App.Internal.Assets.targets left in tree.
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch=diff' to see the failed patch
hint: When you have resolved this problem, run "git am --continue".
hint: If you prefer to skip this patch, run "git am --skip" instead.
hint: To restore the original branch and stop patching, run "git am --abort".
hint: Disable this message with "git config advice.mergeConflict false"
Patch failed at 0001 Don't cache index.html when running via Dev Sever
Error: The process '/usr/bin/git' failed with exit code 128Please backport manually! |
MackinnonBuck
added a commit
that referenced
this pull request
Dec 5, 2024
10 tasks
10 tasks
wtgodbe
pushed a commit
that referenced
this pull request
Jan 9, 2025
wtgodbe
pushed a commit
that referenced
this pull request
Jan 9, 2025
maraf
added a commit
to maraf/runtime
that referenced
this pull request
Jan 10, 2025
captainsafia
pushed a commit
that referenced
this pull request
Feb 11, 2025
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.
[Blazor WebAssembly standalone] Don't cache
index.htmlduring developmentFixes an issue where the WebAssembly dev server (used during Blazor WebAssembly standalone development) returned
index.htmlwith incorrect caching headers, resulting in hot reload script injection sometimes being bypassed.Description
The fix is to add the
Cache-Control: no-storeheader to the response forindex.htmlwhen running the app via the WebAssembly dev server. This prevents the browser from using a cached response, which bypasses the script injection middleware.Fixes #59276