home-hero

Frequently Asked Questions:

Blazor WebAssembly (WASM) vs. Server

 

What is the difference between Blazor WebAssembly (WASM) vs. Server?

The Blazor web framework allows Razor components to be hosted in different ways. They can run server-side in ASP.NET Core (Blazor Server) and client-side in the browser on a WebAssembly-based .NET runtime (Blazor WebAssembly or Blazor WASM).

  • In the server-side hosting model (Blazor Server-Side), Blazor is executed on the server from within an ASP.NET Core app. UI updates, event handling, and JavaScript calls are handled over a SignalR connection.
  • The Blazor Server hosting model offers several benefits:
  • Smaller payload size with fast initial load time (compared to Blazor WebAssembly)
  • Complete .NET API compatibility
  • Blazor Server apps have direct access to server and network resources where the app is executing.
  • Support for thin clients - Blazor Server apps work with browsers that don't support WebAssembly and on resource-constrained devices
  • Near native execution speed - Blazor Server apps generally execute on the server quickly. However, they are usually slower than other types of apps that execute natively on the client.

Blazor Server has as a built-in feature the maintenance of app code securely and privately on the server.

In the client-side model (Blazor WebAssembly), the Blazor app, its dependencies, and the .NET runtime are downloaded to the browser, and the app is executed directly on the browser UI thread. All UI updates and event handling happen within the same process.

 

webassembly-vs-serverwebassembly-vs-server

The Blazor WASM hosting model offers several benefits:

  • Run Blazor apps offline once downloaded - Blazor WebAssembly apps built as Progressive Web Apps (PWAs) can run offline (for example when when clients aren't able to connect to the Internet)
  • Static site hosting - Blazor WebAssembly apps are downloaded to clients as a set of static files (no server is required to execute server-side code in order to download and run)
  • Offloads processing to clients (apps are executed on the clients)

Both Blazor Server and Blazor WebAssembly are deployed as web apps that are updated on the next app refresh.

Telerik UI for Blazor supports and will continue to support all Blazor WebAssembly previews until its official release. To keep up to date with the latest release of Blazor WebAssembly and our support for it, visit our What’s new page.

Learn how to get started with Blazor Server in a few easy steps.