Essay · 5 min read
March 2026
Building for Speed: How I Optimize Every Site for Sub-Second Load Times
Speed isn't a feature — it's the foundation. Here's the exact process I use to get every site loading in under a second.
Speed is the baseline
Every site I build loads in under a second. Not as a stretch goal — as a requirement. If the Largest Contentful Paint is over 1.2 seconds, I'm not done yet. This isn't perfectionism. It's the difference between a site that ranks and one that doesn't.
Google's own data shows that 53% of mobile visitors leave a page that takes longer than 3 seconds to load. That's not a slow site — that's a site that most businesses would consider "normal." The bar is on the floor, and most websites still trip over it.
The stack matters more than the optimization
You can optimize a WordPress site all day and still end up with a 2-second load time. The optimization ceiling is set by the architecture. A statically generated Next.js site deployed to a CDN starts fast and stays fast because there's nothing to slow it down — no database queries, no server-side rendering on every request, no PHP execution.
My default stack — Next.js with static export, Tailwind CSS, deployed to Cloudflare Pages — gives me a sub-200ms Time to First Byte before I write a single line of optimization code. That's the foundation.
Image optimization: the biggest win
On most sites, images account for 60-80% of total page weight. A single unoptimized hero image can add 3-5 seconds to load time. Here's what I do:
- Convert all images to WebP or AVIF format — 30-50% smaller than JPEG at the same quality
- Serve responsive sizes with srcset — a mobile user shouldn't download a 2000px wide image
- Lazy load everything below the fold — only the hero image loads immediately
- Set explicit width and height to prevent Cumulative Layout Shift
This alone typically cuts 2-4 seconds off load time compared to the "upload a JPEG and call it done" approach.
JavaScript discipline
Every third-party script is a tax on your users. Google Analytics, chat widgets, social embeds, cookie consent banners — they all add up. I audit every script and ask: does this justify the milliseconds it costs?
For animations, I use GSAP and Framer Motion — both are well-optimized and tree-shakeable. For icons, I use Lucide (individual SVG imports, not an icon font that loads 500 glyphs for 12 icons). Every dependency earns its place.
The deployment edge
The last piece is deployment. Cloudflare Pages serves static files from 300+ edge locations worldwide. A visitor in Tokyo gets the same sub-second load time as a visitor in Seattle. No origin server, no round trips, no cold starts. The site is just... there.
Combined with proper cache headers, Brotli compression, and HTTP/3, this stack consistently delivers Lighthouse scores of 95-100. Not on a good day — every day.
Want this kind of work for your business?
Custom websites that bring in customers — three days from kickoff to live, sub-second loads, ranking on Google from week one.