Achieving 90% Mobile Web Performance at Tokopedia
Article Summary
Tokopedia slashed their mobile homepage JavaScript from 320kB to just 37kB. Here's how they did it without rebuilding everything.
Indonesia's largest e-commerce platform needed a blazing-fast landing page for new mobile users. Instead of using AMP, they experimented with SvelteJS, a framework that compiles to vanilla JavaScript, to create a lightweight alternative to their React app.
Key Takeaways
- Reduced JavaScript bundle from 320kB to 37kB (88% reduction)
- Achieved 90+ Lighthouse score and 4-second time to interactive
- Used Svelte with SSR, Emotion for CSS, and dynamic polyfill loading
- Service worker precaches React app assets in background for seamless navigation
- Built proof of concept in just 2 weeks with unfamiliar tech stack
Critical Insight
By replacing their React homepage with a Svelte-powered landing page, Tokopedia cut load times to near-zero on 4G while maintaining identical UI and user experience.