Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

load .br,use no-cache,but why? #34205

Open
bxjg1987 opened this issue Nov 23, 2024 · 2 comments
Open

load .br,use no-cache,but why? #34205

bxjg1987 opened this issue Nov 23, 2024 · 2 comments

Comments

@bxjg1987
Copy link

bxjg1987 commented Nov 23, 2024

Description

.net9

app.MapStaticAssets();

const response = await fetch(defaultUri + '.br', { cache: 'no-cache' });

why use cache: 'no-cache'

Page URL

https://learn.microsoft.com/zh-cn/aspnet/core/blazor/host-and-deploy/webassembly?view=aspnetcore-9.0#compression

Content source URL

https://github.com/dotnet/AspNetCore.Docs/blob/main/aspnetcore/blazor/host-and-deploy/webassembly.md

Document ID

250e7458-3c1d-0117-261d-c03ac136f16a

Article author

@guardrex

Related Issues

Copy link
Contributor

🍂🎃🏮 Autumn Skies and Pumpkin Pies! 🥧☕🍂

Stand by! A green dinosaur 🦖 will arrive shortly to assist.

@guardrex
Copy link
Collaborator

guardrex commented Nov 23, 2024

Hello @bxjg1987 ... I'll ask the product unit to confirm that this guidance shouldn't be followed when MapStaticAssets routing endpoint conventions are used. If that's correct, I'll add a remark to the top of the section.

I think the section can also say that files aren't cached in order to avoid a problem where some cached assets load with non-cached assets resulting in a mismatched set of framework files that can break the app. We'll find out shortly.

Stand-by ... I'll ping Javier to look at this on Monday.

@guardrex guardrex moved this from Triage to P2 - Medium Priority in Blazor.Docs Nov 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: P2 - Medium Priority
Development

No branches or pull requests

2 participants