Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to make progressive web apps with Blazor Server Side? [closed]

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?

like image 272
ljh Avatar asked Oct 16 '20 10:10

ljh


Video Answer


1 Answers

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

like image 87
ljh Avatar answered Oct 26 '22 01:10

ljh