Search code examples
blazorblazor-client-side

Cache Busting in blazor


Is there any solution for Cache busting in Blazor? I Converted my asp.net core application in Blazor WebAssembly, where I was using asp-append-version=true in razor pages for client cache update.

Found same issue with DLLs


Solution

  • Adding my answer based on @Mister Comment.

    BlazorPWA.MSBuild nuget package is to generate PWA required files.

    For Update Cache, you have changes your proj file every time when you are going to publish code.

    <ServiceWorkerCacheVersion>1</ServiceWorkerCacheVersion>
    <ServiceWorkerForce>true</ServiceWorkerForce>
    

    Check this like if you want to implement this nuget package.