.NET 9 Blazor Server - some static assets are not being cached/fingerprinted #59101
Unanswered
BieleckiLtd
asked this question in
Q&A
Replies: 1 comment
-
The packages' static files don't seem to be affected. We have to wait until their authors also implement MapStaticAssets |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi.
I'm migrating Blazor Server app to .NET 9 and want to make use of new static assets compression and fingerprinting API. I have changed in
Program.cs
toapp.MapStaticAssets();
and updated links inApp.razor
to<link rel="stylesheet" href="@Assets["css/prism.css"]" />
But still, some assets are not getting fingerprint and are being pulled on every 'soft' refresh with status code 200, while other (MudBlazor for example) are getting 304 Not Modified. Any idea why?
In fact, after switching to
MapStaticAssets()
consecutive loads are slightly heavier compared toUseStaticFiles()
because files asMudBlazor.min.js
are not being fulfilled by memory cache any more:IIS, Blazor Server, pre-rendering disabled (render mode InteractiveServerRenderMode(prerender: false))
Beta Was this translation helpful? Give feedback.
All reactions