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

Enable WasmFingerprintAssets for cache busting #166

Merged
merged 5 commits into from
Nov 22, 2024

Conversation

ScarletKuro
Copy link
Member

The HttpClient method has been removed, and DLL data is now retrieved directly from the dotnet-resources-/.
This allows cache busting to be applied via WasmFingerprintAssets.

Previously, when running from TryMudBlazor.Server, accessing links like https://localhost:5001/_framework/Microsoft.AspNetCore.Components.WebAssembly.dll would result in a 404 error. The correct link should have been https://localhost:5001/_framework/Microsoft.AspNetCore.Components.Forms.vnx3zz3bws.dll, but we couldn't retrieve the fingerprint (e.g., vnx3zz3bws) for the DLLs. It seems the legacy method of hosting WASM+ASP.NET Core together doesn't fully support this feature because the ResourceAssetCollection didn't return the necessary fingerprint information.
Therefore, using JS is the most optimal solution.

This approach works for both running as standalone WASM from TryMudBlazor.Client and the cohosted version from TryMudBlazor.Server.

When testing, please ensure to test both versions.

@ScarletKuro ScarletKuro requested a review from mikes-gh November 22, 2024 20:05
Copy link

@mikes-gh mikes-gh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM
Tested wasm and hostedwasm

@ScarletKuro ScarletKuro merged commit 6bc4ba2 into MudBlazor:main Nov 22, 2024
2 checks passed
@ScarletKuro ScarletKuro deleted the loading branch November 22, 2024 22:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants