A static landing page has every advantage. There is no database, no server-side rendering and no login. Still, plenty of them load slowly on a phone over a mediocre connection. The cause is rarely the HTML. It is usually a large hero image, two font families in four weights, a CSS framework that is mostly unused, and some third-party scripts added one at a time.

This post is a pass you can run on any landing page in an afternoon. The order matters. Measure first, fix the things that block the first meaningful paint, then make sure it stays fixed.

Step 1: Measure before you touch anything

Without a baseline you cannot tell whether a change helped. Record these numbers for the page as it is today:

  • Largest Contentful Paint (LCP): when the biggest visible element (usually the hero image or headline) finishes rendering.
  • Cumulative Layout Shift (CLS): how much the page jumps around while it loads.
  • Total transfer size and request count, from the Network panel with the cache disabled.
  • Time to first byte, which tells you whether the host itself is slow.

Use Lighthouse in Chrome DevTools or PageSpeed Insights with a mobile profile. Desktop on office Wi-Fi hides almost every problem. In the DevTools Network panel, turn on throttling and look at the waterfall. Anything that starts late or blocks rendering above the fold is a candidate.

Run each measurement three times and write down the median. Lab numbers vary between runs, and one run can mislead you.

Step 2: Fix the hero image

On most landing pages the hero image is the LCP element, and it is often the largest file on the page. Four changes usually help more than everything else in this post combined:

  1. Serve modern formats. Export AVIF and WebP versions, and keep a JPEG or PNG as a fallback.
  2. Serve the right size. A phone should not download an image sized for a wide desktop monitor. Use srcset and sizes.
  3. Reserve the space. Set width and height attributes so the browser knows the aspect ratio before the image arrives. This removes most layout shift.
  4. Load it early. Never lazy-load the hero. Mark it fetchpriority="high" so the browser fetches it ahead of less important resources.
<picture>
  <source type="image/avif"
          srcset="/img/hero-800.avif 800w, /img/hero-1600.avif 1600w"
          sizes="(max-width: 800px) 100vw, 800px">
  <source type="image/webp"
          srcset="/img/hero-800.webp 800w, /img/hero-1600.webp 1600w"
          sizes="(max-width: 800px) 100vw, 800px">
  <img src="/img/hero-800.jpg"
       width="1600" height="900"
       alt="The app's main screen showing a weekly summary"
       fetchpriority="high">
</picture>

Images below the fold, like feature screenshots and testimonials, should use loading="lazy" and also have explicit dimensions. If the hero is a background image set in CSS, the browser finds it later than an <img> tag in the HTML. Moving it into the markup is often an easy LCP win.

Step 3: Cut fonts down to what you use

Web fonts block or delay text rendering, and on a landing page the text is the message. Options, from fastest to slowest:

  • A system font stack. It costs nothing to download, and on a clean layout it often looks fine.
  • One self-hosted variable font in WOFF2, subset to the characters you actually need. Self-hosting avoids an extra connection to another origin.
  • Several families from a third-party font service. This is convenient, but it costs the most.

If you keep a custom font, use font-display: swap so text appears immediately in a fallback font. Preload only the one file used above the fold.

@font-face {
  font-family: "Brand";
  src: url("/fonts/brand-subset.woff2") format("woff2");
  font-weight: 400 700;
  font-display: swap;
}

<link rel="preload" href="/fonts/brand-subset.woff2"
      as="font" type="font/woff2" crossorigin>

To limit the layout shift when the font swaps in, choose a fallback with similar proportions. Modern browsers also support size-adjust on a fallback @font-face rule, so you can match the two more closely.

Step 4: Shrink CSS and stop it blocking

Every stylesheet in the <head> blocks rendering until it downloads. For a single landing page:

  • If you pulled in a full CSS framework for a few utilities, run its purge or tree-shaking step, or replace it with a few hundred lines of your own CSS.
  • Keep one stylesheet, not several. Each extra file adds another request before anything can render.
  • If the CSS needed for the first screen is small, inline it in a <style> tag and load the rest normally. Inlining everything works against caching on repeat visits, so inline only what the first screen needs.

To find unused rules, open the Coverage tab in DevTools, which shows how much of each CSS and JS file actually ran on the page.

Step 5: Question every script

A landing page usually needs very little JavaScript. Go through every <script> tag and sort it into one of three groups:

  • Needed for the first screen. This group is rarely more than a mobile menu toggle. Keep it small and add defer.
  • Needed later. Carousels, video embeds and contact forms. Load these on interaction or when they scroll into view. A video embed can start as a static thumbnail that loads the real player on click.
  • Nice to have. Chat widgets, heatmaps, extra tag managers. Decide whether you actually look at what they collect. If you do not, remove them.

Third-party scripts deserve the closest look, because you do not control their size or how often they change. Check the Network panel filtered to third-party domains. That shows what they really cost, not what their docs say.

Step 6: Get delivery right

A small page can still be slow if the server is slow or misconfigured. Check:

  • Compression. HTML, CSS, JS and SVG should be served with Brotli or gzip.
  • HTTP/2 or HTTP/3, which most CDNs and modern hosts enable by default.
  • A CDN or edge host for static files, so time to first byte stays low for visitors far from your server.
  • Caching headers. Fingerprinted assets (app.3f9c2a.css) can be cached for a long time. The HTML should revalidate so updates appear. The details are covered in HTTP Caching for Small Sites: A Practical Header Policy.

You can check most of this from the terminal:

# Which compression and cache policy does the server send?
curl -sI -H 'Accept-Encoding: br, gzip' https://example.com/ \
  | grep -iE 'content-encoding|cache-control|server'

# Bytes over the wire and time to first byte
curl -s --compressed -o /dev/null \
  -w 'bytes: %{size_download}  ttfb: %{time_starttransfer}s\n' \
  https://example.com/

Step 7: Keep it fast with a budget

Pages get slower over time as people add one image or one script at a time. A size budget that runs on every build catches that early. Base the number on your measured baseline after this pass, plus a small margin. Do not copy a number from somewhere else.

#!/bin/sh
# Fail the build if gzipped HTML/CSS/JS exceeds the budget.
max=120000
total=$(find dist -type f \( -name '*.html' -o -name '*.css' -o -name '*.js' \) \
  -exec gzip -9 -c {} \; | wc -c)
echo "gzipped html/css/js: $total bytes (budget $max)"
[ "$total" -le "$max" ] || { echo "Over budget"; exit 1; }

Do the same for images: a separate check that flags any single image over a size you choose catches the uncompressed 4 MB screenshot before it ships. If you already deploy with a script, add the check there. Automating Releases With One Script shows one way to set that up.

A quick checklist

  • Baseline recorded on a throttled mobile profile, median of three runs.
  • Hero image in AVIF/WebP, responsive, sized with width and height, not lazy-loaded, high fetch priority.
  • Below-the-fold images lazy-loaded with dimensions.
  • At most one custom font file preloaded, with font-display: swap.
  • One small stylesheet, unused framework CSS removed.
  • Every script justified, deferred or loaded on interaction.
  • Compression, HTTP/2+, and a sensible cache policy confirmed with curl.
  • A size budget that fails the build.

Wrapping up

Making a static landing page fast does not take a new framework. It takes removing what you do not need and loading the rest in the right order. Measure, fix the hero image and fonts first, cut CSS and scripts, check delivery, then add a budget so the page stays fast. Re-run the same measurements afterwards and compare them with your baseline. That comparison shows you which changes actually helped.