Summary
Adopt the Blazor-recommended asset referencing pattern for .NET 9+ (@Assets["..."]) in the Store Blazor Server app for CSS/JS (and any other static assets referenced from components/layouts).
Why
With MapStaticAssets, ASP.NET Core fingerprints assets and sets caching headers (including immutable) so browsers cache assets indefinitely until content changes. Using @Assets["..."] ensures the app emits the correct fingerprinted URL.
Guidance (docs)
Acceptance criteria
- CSS/JS references in root components/layouts use
@Assets["{PATH}"] where applicable.
- No regressions in styling or script loading.
- Validate that
ImagePrefix guidance remains intact for product images (do not break existing ImagePrefix usage).
Summary
Adopt the Blazor-recommended asset referencing pattern for .NET 9+ (
@Assets["..."]) in theStoreBlazor Server app for CSS/JS (and any other static assets referenced from components/layouts).Why
With
MapStaticAssets, ASP.NET Core fingerprints assets and sets caching headers (includingimmutable) so browsers cache assets indefinitely until content changes. Using@Assets["..."]ensures the app emits the correct fingerprinted URL.Guidance (docs)
ComponentBase.Assets/@Assets[...]): https://learn.microsoft.com/aspnet/core/blazor/fundamentals/static-files?view=aspnetcore-10.0Acceptance criteria
@Assets["{PATH}"]where applicable.ImagePrefixguidance remains intact for product images (do not break existingImagePrefixusage).