Skip to content
TBH
Back to blog
December 28, 20252 min read

How to optimize your website speed

Speed is critical. Google uses it as a ranking factor, and users leave slow pages.

Why speed matters

  • 53% leave a page that takes over 3 seconds to load
  • 1 second delay = 7% fewer conversions
  • Core Web Vitals directly affect your Google ranking

The most important optimizations

1. Optimize images

Images are often the biggest culprit.

  • Use WebP or AVIF format
  • Lazy load images below the fold
  • Specify width and height in HTML
  • Use srcset for responsive images

2. Minimize JavaScript

  • Remove unused code
  • Code-split large bundles
  • Defer non-critical scripts
  • Avoid render-blocking JS

3. Use CDN

A Content Delivery Network serves content from servers close to the user.

  • Vercel Edge Network - Built-in
  • Cloudflare - Free tier
  • AWS CloudFront - Enterprise

4. Enable caching

Correct cache headers mean fewer requests.

Cache-Control: public, max-age=31536000, immutable

5. Optimize fonts

  • Use font-display: swap
  • Preload critical fonts
  • Consider system fonts

Test your speed

  • PageSpeed Insights - Google's official tool
  • WebPageTest - Detailed analysis
  • Lighthouse - Built-in to Chrome DevTools

Our approach

All our sites score 90+ on PageSpeed from day one. Performance isn't something we add afterwards.

We build all sites with performance in mind from day one. Next.js, image optimization, and CDN hosting are standard.

See what we have built

Nordvec, nævn.dk, Matematik i Måneby in the browser, Semantika and open source.

See the projects