In Blazor with Interactive Auto Mode is enable Globally. When user with slow internet speed first load the page, Blazor doesn't wait for Signal R to connect before start downloading .wasm files, and connect successfully after ~90% of .wasm files are downloaded (I think because those .wasm files took all the internet bandwidth). This causing the user with slow internet speed cannot interact or navigate between pages for some period of time starting from they first load the page until Signal R is connected.
I think the downloading progress of .wasm files is too aggressive and consume all the available bandwidth causing Signal R cannot be connected, and Navigation between pages is also pending until ~90% of .wasm files are downloaded.
Expected Behavior
At least user should be able to navigate between pages using Server Side Prerendering if Signal R has not been connected successfully.
User should be able to interact with the UI first before .wasm start downloading.
The download progress of .wasm file need to be balanced with Signal R connection so that the downloading progress of .wasm files doesn't consume all the internet bandwidth.
I think there are 2 options in my opinion:
Blazor should wait for Signal R connected successfully, then download .wasm file. So we make sure user can interact with UI or navigating between pages.
Fix Enhance Navigation so that Blazor prioritize navigation between pages in Server Side Prerendering and not rely on waiting Javascript to fetch the new URL since It will always wait all .wasm files to be downloaded first.
Steps To Reproduce
Create Blazor Web App using latest template from Visual Studio 2022 with the following settings:
Run project using Visual Studio 2022 IIS Express using Chrome.
Navigate to Counter Page.
Open Chrome Dev Tool.
In "Application" tab, expand "Cache storage". Right click on "dotnet-resource", select "delete"
In "Network" tab, Select "Slow 3G".
Right click on Reload Icon on Top Left Browser, Select "Empty Cache and Hard Reload"
Click On "Click me" to verify if counter increase
Navigate to other pages to verify user can navigate using Server Side Prerendering
Exceptions (if any)
No response
.NET Version
8.0.100
Anything else?
Screen shoot of Signal R is not connected yet but .wasm files are starting downloading causing there is no bandwidth left for Signal R.
Signal R is only connected after ~90% of .wasm files finished downloading.
Navigating to Weather page also pending since It has to wait for .wasm finished downloading
Is there an existing issue for this?
Describe the bug
In Blazor with Interactive Auto Mode is enable Globally. When user with slow internet speed first load the page, Blazor doesn't wait for Signal R to connect before start downloading .wasm files, and connect successfully after ~90% of .wasm files are downloaded (I think because those .wasm files took all the internet bandwidth). This causing the user with slow internet speed cannot interact or navigate between pages for some period of time starting from they first load the page until Signal R is connected.
I think the downloading progress of .wasm files is too aggressive and consume all the available bandwidth causing Signal R cannot be connected, and Navigation between pages is also pending until ~90% of .wasm files are downloaded.
Expected Behavior
I think there are 2 options in my opinion:
Steps To Reproduce
Create Blazor Web App using latest template from Visual Studio 2022 with the following settings:
Run project using Visual Studio 2022 IIS Express using Chrome.
Navigate to Counter Page.
Open Chrome Dev Tool.
Click On "Click me" to verify if counter increase
Navigate to other pages to verify user can navigate using Server Side Prerendering
Exceptions (if any)
No response
.NET Version
8.0.100
Anything else?
Screen shoot of Signal R is not connected yet but .wasm files are starting downloading causing there is no bandwidth left for Signal R.
Signal R is only connected after ~90% of .wasm files finished downloading.
Navigating to Weather page also pending since It has to wait for .wasm finished downloading