Tokopedia Jacky Efendi

How Tokopedia Achieves 90% Mobile Web Performance at Tokopedia

Original post 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

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.

Continue reading

What This Article Covers

Problem

Tokopedia's homepage got a lot of traffic, but it was too complex to build with AMP's limited JavaScript. The team needed a different approach.

Solution

They switched to SvelteJS, which compiles to vanilla JavaScript. They added Emotion for CSS-in-JS and set up dynamic polyfill loading to keep the initial bundle small while still supporting server-side rendering for SEO.

Impact

Time to interactive dropped to 4 seconds and the Lighthouse score averaged 93. On 4G connections, Google's Test My Site tool showed 0-second load times for the new landing page.

The team shares honest insights about Svelte's limitations and missing tooling that React developers take for granted.

This page summarizes “Achieving 90% Mobile Web Performance at Tokopedia” by Tokopedia, published Jun 15, 2021. All credit for the original work goes to the authors.

Read the original on medium.com (opens in new tab)