fix: JS and CSS cache issues in V2.3.0 and above
See original GitHub issue🐛 Bug Report
Since JS and CSS files were included in the library we have had cache issues in production with new versions. Primarily CSS but it could also be JS related.
https://www.fluentui-blazor.net/WhatsNew#v2.3.0
For every other library imported we use asp-append-version="true" which prevents cache errors. Since JS and CSS are included we can not do that for Microsoft.Fast.Components.FluentUI. Tested that asp-append-version="true" works with both Blazor Server and Blazor WebAssembly. In the case of Blazor WebAssembly I got it to work in a ASP.NET Core Hosted project.
Affected files:
Microsoft.Fast.Components.FluentUI.lib.module.js Microsoft.Fast.Components.FluentUI.bundle.scp.css web-components.min.js
💁 Possible Solution
Use asp-append-version="true" or similar to appen hash.
If this is not possible then add the possibility for a user to include CSS and JS files themselves without them being automatically loaded. This is not the preferred solution though.
Issue Analytics
- State:
- Created 3 months ago
- Comments:5 (2 by maintainers)

Top Related StackOverflow Question
Although this will probably not solve all the problems with caching, we’ve added a version indicator to the included web components javascript file link in version 2.4.2
@vnbaaij Can we keep it open to track the bug? I would rather see it open and blocked to show that the bug is present but can not be fixed now. It will also show as an open bug to the aspnetcore team if it remains open.