Framework JS files are static web assets (#34441)

pull/34418/merge
Luke Latham 2025-01-06 08:01:45 -05:00 committed by GitHub
parent 2ef16de0c1
commit 15be48e63e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 20 additions and 0 deletions

View File

@ -50,8 +50,18 @@ In a traditional server-rendered app, opening the same app in multiple browser s
![The browser interacts with Blazor (hosted inside of an ASP.NET Core app) on the server over a SignalR connection.](~/blazor/hosting-models/_static/blazor-server.png)
:::moniker range=">= aspnetcore-10.0"
On the client, the Blazor script establishes the SignalR connection with the server. The script is served as a static web asset with automatic compression and [fingerprinting](https://developer.mozilla.org/docs/Glossary/Fingerprinting).
:::moniker-end
:::moniker range="< aspnetcore-10.0"
On the client, the Blazor script establishes the SignalR connection with the server. The script is served from an embedded resource in the ASP.NET Core shared framework.
:::moniker-end
The Blazor Server hosting model offers several benefits:
* Download size is significantly smaller than when the Blazor WebAssembly hosting model is used, and the app loads much faster.

View File

@ -536,8 +536,18 @@ The project structure of the client-side app in a hosted Blazor Webassembly solu
## Location of the Blazor script
:::moniker range=">= aspnetcore-10.0"
The Blazor script is served as a static web asset with automatic compression and fingerprinting. For more information, see <xref:blazor/fundamentals/static-files>.
:::moniker-end
:::moniker range="< aspnetcore-10.0"
The Blazor script is served from an embedded resource in the ASP.NET Core shared framework.
:::moniker-end
:::moniker range=">= aspnetcore-8.0"
In a Blazor Web App, the Blazor script is located in the `Components/App.razor` file: