Skip to content
Back to blog
Lancartech Team 2 min read

How to Build a Fast Website for Indonesian Users

CDN, image optimization, edge caching, and specific tactics for Indonesia where 80%+ of traffic is mobile 4G/5G.

How to Build a Fast Website for Indonesian Users

Indonesian market reality

  • 80%+ traffic is mobile (Indonesia Internet Service Provider Association data)
  • 4G dominant (~30 Mbps average, with drops outside Greater Jakarta)
  • Quota-sensitive users — every extra MB image = higher bounce rate
  • Latency to non-Indonesian servers: 30-100 ms depending on location

Stack recommendations for speed

1. CDN with Indonesian PoPs

Cloudflare has a PoP in Jakarta (CGK) — minimal latency. Alternatives: Akamai, Bunny.net (Jakarta PoP), Vercel Edge Network.

Setup: domain pointing to Cloudflare with proxy enabled (orange cloud).

2. Aggressive image optimization

  • Format: AVIF > WebP > JPEG. Astro/Next.js auto-convert.
  • Responsive sizes: 320w for mobile, 1280w for desktop. srcset + sizes.
  • Lazy load every below-the-fold image.
  • Quality 75-80 — visually identical, 40%+ smaller.
---
import { Image } from 'astro:assets';
import hero from '../assets/hero.jpg';
---
<Image src={hero} alt="..." widths={[320, 640, 1280]}
       sizes="(max-width: 768px) 100vw, 50vw" format="avif" />

3. Self-host fonts or use font-display: swap

Google Fonts has a good CDN, but still an external blocking request. Self-host with font-display: swap is faster:

@font-face {
  font-family: 'Inter';
  src: url('/fonts/Inter.woff2') format('woff2');
  font-display: swap;
}

4. Edge caching for static pages

Astro static site → every HTML cached at the CDN edge. With Cloudflare:

Cache-Control: public, max-age=300, s-maxage=86400

max-age=300 (5 min) for the browser, s-maxage=86400 (24 hr) for the CDN. Purge cache on deploy.

5. Minimize JavaScript

JavaScript is the main culprit for slow mobile. Strategy:

  • Astro islands — JS only for specific interactive components.
  • No React for static pages that don’t need it — use vanilla or Astro.
  • Tree shake with a modern bundler (Vite, Bun).
  • Preload critical (<link rel="preload">), defer the rest.

Target metrics

For Indonesian audiences on 4G:

  • LCP: < 2.5s (Google “Good”)
  • INP: < 200 ms
  • CLS: < 0.1
  • JS bundle: < 100 KB gzipped for the landing page
  • Total page weight: < 1 MB for first load

Tools to test with

  • PageSpeed Insights — Google’s tool, real-user data via Chrome UX Report
  • WebPageTest — set location to Singapore (closest to Indonesia)
  • Lighthouse in Chrome DevTools — local test

Don’t only test from the office (100 Mbps fiber). Throttle to 4G in DevTools.

Common mistakes

  1. Hosting only in US/EU — 200+ ms latency to Indonesia. Add a CDN minimum.
  2. Huge PNG hero images — convert to AVIF/WebP, target < 100 KB.
  3. Heavy libraries for small features (Moment.js for date format — use date-fns or Intl).
  4. Auto-play video — bandwidth + bandwidth + bandwidth.
  5. Pop-ups & cookie banners that block rendering.

Free performance audit — send your URL, we’ll return a report.

Lancartech Team · · 2 min read

Ready to start your next project?

Initial consultation is free — let's design a digital strategy that fits your business.