Dev.to
7/4/2026

How I got LCP under 2s on a 38-page Blazor WebAssembly site (Cloudflare Pages)
Short summary
Blazor WebAssembly performance engineer reduced Largest Contentful Paint (LCP) from 6–8s to under 2s through six mechanical fixes: removing unnecessary service worker registration, eliminating self-reload logic, adding preconnect hints, and proper cache busting. Real commits and metrics demonstrate Blazor viability with correct architecture—performance depends on engineering choices, not framework limitations. Techniques apply to single-page applications broadly.
- •Six specific optimizations reduced LCP from 6–8s to under 2s on a 38-page site with measured impact per fix
- •Removed service worker registration (200ms) and self-reload function (2000ms) as largest wins
- •Added preconnect hints and cache versioning for cold pageview optimization
Generated with AI, which can make mistakes.
Is this a good recommendation for you?



