Passing Core Web Vitals with a .NET site

Scoring green on mobile is rarely about more server capacity. It is almost always about what the browser has to do before anything appears.

  • Performance
  • SEO
  • .NET

Measure first, optimise second

Lab numbers from a tool on a fast laptop say very little. Look at field data: what do real visitors experience on a mid-range phone over 4G? That is also what counts towards ranking.

Start with the biggest of the three: Largest Contentful Paint. In practice that is almost always an image or a font arriving too late.

What helps most often

  • Set width and height on every image; it costs nothing and removes most of your layout shift.
  • Load fonts with font-display: swap and preload only the weight used above the fold.
  • Serve images as AVIF or WebP and lazy-load everything below the fold.
  • Turn on response compression and output caching; in ASP.NET Core that is two lines in Program.cs.
  • Be critical of third-party scripts — a single tag manager can cost more than your whole application.

Keeping it green

Performance is not a project but a property you can lose with any release. Put a budget in your pipeline: if the build fails when the bundle grows beyond what was agreed, things stay good by themselves.

Running into the same thing?

Email the question. You get an answer from whoever wrote the article.

An unexpected error occurred. Reload 🗙