Search code examples
blazorofflineblazor-webassembly

Blazor - Web assembly loading time


I have developed Blazor Server Server application and customers obviously do not like the message "Could not reconnect to the server. Reload the page to restore functionality". This is the reason I am trying to explore migration to Web Assembly.

I am struggling, how to speed up web assembly loading time , because home page cannot be loaded several seconds. Is there a chance to load initial Server page and in the background load Web assembly and "redirect" user to web assembly once it is fully loaded ?

Explanation of business functionality needed ( not working in Server mode ):

  1. User is in the middle of filling the form ( e.g. Applying for membership filling all personal information )
  2. Connection is dropped (e.g. for 30 seconds)

User would like to fill the form without any disruption even offline. Once user is back online form is Submitted by the user. Obviously , when submit is processed, user needs to be back on line.

Edit: I have accepted perfect answer to my question. Thanks for pointing this article to @MrCakaShaunCurtis.

But I have asked wrong question, because my (and customer's) concern was annoying overlay message "Could not reconnect to the server. Reload the page to restore functionality". My questions was supposed to be: "How to disable this message". The answer is described here https://github.com/dotnet/aspnetcore/issues/10325


Solution

  • There's an article here that explains how to first load in Server mode and then switch to Web Assembly.