Blazor comes in two flavors: Server and WebAssembly. Both let you write C# for the browser, but they work very differently. Here’s how to choose.
Blazor Server
- UI runs on server, updates via SignalR
- Fast initial load (small download)
- Full .NET runtime access
- Requires constant connection
- Server resources per user
Blazor WebAssembly
- Runs entirely in browser
- Larger initial download (~5-10MB)
- Works offline (PWA capable)
- No server resources per user
- Limited to .NET APIs in browser
Decision Table
| Factor | Server | WebAssembly |
|---|---|---|
| Initial load | Fast | Slow (first time) |
| Offline support | No | Yes |
| Server requirements | Higher | Static hosting OK |
| Latency sensitive | Issues on slow connections | Better UX |
| .NET compatibility | Full | Browser subset |
My Recommendation
Start with Server for internal apps where you control the network. Choose WebAssembly for public-facing apps where you want offline capability and CDN hosting.
References
Discover more from C4: Container, Code, Cloud & Context
Subscribe to get the latest posts sent to your email.