-
Notifications
You must be signed in to change notification settings - Fork 10.3k
Consider adding Progressive Web App (PWA) option to the Blazor Web App template #48935
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
Comments
@danroth27 that requires us to move the service-worker support down one layer to static web assets, which we punted. It should be doable though. |
Depends on #46999 |
Please consider this scenario: A Blazor WebAssembly PWA with offline support and server prerendering. I have it working in .NET 7 but it is quite a head ache to migrate to .NET 8. |
I want to kick off a new project with .NET 8, hoping it kicks off or starts off like Blazor .NET 7 with its awesome Hosted option, which already includes the fantastic PWA capability. Interactive render mode => WebAssembly Unfortunately, that amazing PWA feature is missing from .NET 8. How can we build an extraordinary and user-friendly web framework as promised when that feature is gone? Please reconsider bringing back the PWA capability in the Blazor Server App feature. Perhaps by restricting the PWA options to appear only if the settings are configured, as suggested by @SteveSandersonMS in #50433 |
@RyansBello You can still build a PWA; we just don't have checkbox in the template wizard that sets it up for you. For example you can add your own I totally appreciate it's nonobvious and harder to get started than if there was a template option. I agree it would be good if we could add a template option for it in the future. If you are determined, it is possible to proceed right now with some extra manual setup work. |
In .Net 7, Blazor Webassembly with Asp.Net Core hosting could prerender and also work on PWA, just like the JavaScript Framework. |
Thanks for contacting us. We're moving this issue to the |
Based on some community feedback, I tried out setting up a PWA manually using a combination of the Blazor Web and Standalone Blazor WebAssembly templates: https://github.com/SteveSandersonMS/MyDotNet8PWA It does work in this simple case. However:
|
we need blazor wasm with server prerender with pwa.... please @danroth27 and @SteveSandersonMS just bring it back asap... |
I would love to have PWA support with blazor auto render mode. In fact, the scenario you mention @SteveSandersonMS is the perfect scenario for me: Have SSR for the landing/static pages, and have interactive PWA with auto render mode for the app portion of the website. At the moment I work around that with two websites, which works but isn't ideal from a customer journey perspective. I had a look at your example (thanks!), reading your warnings I guess it's best to not use this on production? |
@danroth27 @SteveSandersonMS I'm just giving this a ping to see if it made it onto the roadmap for .Net 9.0. I am like others, would love to migrate from .Net 7.0. |
@gragra33 Unfortunately, this issue didn't make the cut for .NET 9, but you should still be able to retarget your existing app to .NET 8 without having to make any code changes. The existing Blazor Server and Blazor WebAssembly hosting models are still fully supported in .NET 8. |
@danroth27 Thanks for responding so quickly. I will continue to work with what is available. I will hold hope for .Net 10. Auto + PWA would be powerful. |
Even if we dont want to work off-line, the app can be fully online but I just would like to give to my user the experience of having something "native/installed" to his desktop or mobile instead keep opening the browser and searching for the website/app |
@douglassimaodev If all you want to do is prompt the user to add your page to their homescreen, you can easily add that to your site following the guide at https://developer.mozilla.org/en-US/docs/Web/Progressive_web_apps/Guides/Making_PWAs_installable. This isn't a Blazor-specific thing - it works the same with any web app. |
@douglassimaodev Once installed, how do you upgrade it when a new version of the app is available? |
This is must feature to have to make it easier for us |
And we use PWA to get full screen on the Android devices, it's killer feature. |
My approach is to store a version number in my db, and have a check on page layout level to check the version with an api call. If there is a mismatch prompt the user to update. Or handle it on the |
Currently we only support the Progressive Web App (PWA) template option with the Blazor WebAssembly template. This is primarily because offline scenarios don't make sense with Blazor Server. That said, it's still valid to have an installable PWA that doesn't support offline execution. Could we make our PWA support more general?
With the current Blazor Web App template it's not clear to me if it would ever make sense to enable offline support. The one case this might make sense is if we end up with some option or combination of options that make the entire app interactive using the WebAssembly or Auto render modes, but this isn't the currently plan.
The text was updated successfully, but these errors were encountered: