dotnet / dotnet/aspnetcore

Blazor RenderModeAuto detect when WASM client is downloaded / available

Open
#51,445 13 comments 2 reactions 0 assignees View on GitHub
area-blazor enhancement feature-full-stack-web-ui Pillar: Complete Blazor Web Priority:3
Dominant language
C#
Stars
38.4k
Forks
10.9k
Avg merge
2d 10h
Merged PRs (30d)
281

Description

### Is there an existing issue for this?

- [X] I have searched the existing issues

### Is your feature request related to a problem? Please describe the problem.

_No response_

### Describe the solution you'd like

I'm not certain if this is already available, looking around the docs and other issues in the repo I'm not sure it's even come up.

Given that `RenderModeAuto` only applies on the next visit or a refresh, it would be ideal if we could detect the state of background downloading of WASM assets.

This would allow us to present a form of UI to the user allowing them to refresh the page to get the WASM experience, whilst also freeing up server resources from holding the Server circuits open for longer than they necessarily have to be.

Of course, even better than this would be an API for download progress, so we could present an actual progress bar to the user, but that's really not necessary.

### Additional context

This may not be a typical request, but in the nature of B2B SaaS like ours people tend to leave tabs open for a _very_ long time. This could result in an unnecessarily long circuit being open.

Granted it's likely to be closed by the browser at some point, or on another deployment at our side (think CI) prompting the user to refresh anyway, but if we're able to do that in seconds (ie. when download is complete) rather than hours or potentially even days it could improve the experience and of course free up server resources.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.