Group
  • Performance

    Serve my static assets through a CDN

    Put images, scripts, and styles on a CDN with correct cache headers so repeat visits and distant users stop waiting.

    • Improve quality
    • Ship faster
    • Intermediate
    • General

Free Prompt

My static assets (images, JS, CSS, fonts) are served from my app server or wherever my platform puts them by default, and I want them served properly: fast, cached, and close to users. First, figure out my current situation: how assets are built, where they're served from, and what cache headers they carry today. If I'm on a platform with a built-in CDN (Vercel, Netlify, Cloudflare Pages), verify it's actually being used for my assets rather than assumed. Then: 1. If I have no CDN: recommend the lowest-friction option for my stack (my platform's built-in offering, or Cloudflare in front of the app) and set it up. 2. Cache headers: static assets with content-hashed filenames should get long-lived immutable caching (a year). HTML should get short or no caching so deploys show up immediately. Verify the actual headers being sent, not just the config intent. 3. Filenames: if my build doesn't fingerprint assets (hash in the filename), set that up or explain why my stack makes it unnecessary. Long cache lifetimes without fingerprinting is how users get stuck on old versions. 4. Compression: verify responses are actually compressed (gzip or brotli) for text assets. When done, show me the verification: response headers for a sample of assets demonstrating CDN hits, correct cache-control values, and compression working.

What This Does / How This Helps

This puts your static assets on a CDN with correct cache headers, fingerprinted filenames, and compression, verified by actual response headers. Asset delivery is a solved problem that vibe-coded apps routinely unsolve: everything served from a single app server, no cache headers, and a deploy that busts nothing. The result is slow first visits, slow repeat visits that shouldn't be, and users stuck on stale code reporting bugs you already fixed. The verification step matters because 'the CDN is on' and 'assets are actually cached at the edge' are different facts.

Want to skip doing this by hand?

Fortivibe audits your app for all of the areas these prompts cover (and more).

See What We Check

Related Prompts