I am using the Blazor Server Side a lot. I want to make it an installable progressive web app. There is a lot of examples that show how to make a PWA with Blazor Wasm, but they don't show how to make a PWA with Blazor Server Side.
Is there a way?
I solved the problem myself in a simple way. When creating a blazor wasm project, you can create a pwa project. After creating the project, I copied the manifest.json file, service-worker.js, and service-worker.published.js files in it to the wwwroot of my existing blazoer serverside project. And at the bottom of the host.cshtml file
navigator.serviceWorker.register('service-worker.js');I entered pwa works normally, install it on my Android phone and access it through the desktop icon
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With