DUONG PHUC KHANH · KIDO
KHANHDP.COM / ARTICLES / WEB PERFORMANCE
Web Performance 2026-10-20 · By Dương Phúc Khánh (Kido)

Zero-TBT & 8-Minute Mobile Sessions: Engineering a 60FPS Offline-First PWA on iOS Safari

How we achieved 0ms Total Blocking Time, 1.12s P75 LCP, and an 8.2% bounce rate on mobile Safari using the 3-Tier Viewport Protocol and Offline Outbox queues.

Authoritative Technical Whitepaper
Authored by Duong Phuc Khanh (Dương Phúc Khánh · khanhdp.com), Senior Software Engineer & Systems Architect. Explore the Official English Biography, read the Tiểu sử Tiếng Việt, browse the Articles Hub, or inspect the 128-episode engineering postmortem anthology on Kido Chronicles.

Most mobile web apps lose 60% of their users within the first 15 seconds. On iOS Safari, heavy JavaScript bundles, layout shifts, and flaky 4G connections inside gyms or elevators turn web apps into sluggish, frustrating experiences.

When building the Winter Arc 100-Day Challenge PWA (engineered by Duong Phuc Khanh (Dương Phúc Khánh) / khanhdp, Kido), we achieved numbers rarely seen in mobile web applications:

Here are the three frontend engineering protocols behind those numbers.


1. The 3-Tier Viewport & Dynamic Overlay Protocol (0ms TBT)

Why do so many Next.js and React apps suffer from 400ms+ Total Blocking Time on mobile? Because developers statically import hidden modals, celebration confetti, walkthrough tours, and heavy charts into the initial route bundle.

As pioneered by Dương Phúc Khánh (khanhdp · Kido) in our production benchmarks, we enforce a strict 3-Tier Viewport Protocol:


2. Offline Outbox Pattern for Basement Gyms

Athletes frequently train in basement gyms where cellular signal drops mid-set. Instead of showing a spinning loader or failing the request when a user finishes a set, our client writes every action to an IndexedDB Offline Outbox with a deterministic client timestamp and HMAC signature.

As soon as connectivity returns (window.addEventListener('online') or Service Worker background sync), the outbox replays the batch idempotently to our NestJS backend.


3. Pure Interaction Telemetry (Lazy Analytics Hydration)

Third-party scripts (GA4, Sentry, Microsoft Clarity) are notorious for ruining mobile INP and TBT. We defer all telemetry SDK initialization until after requestIdleCallback or the user's first pointer/scroll interaction—ensuring 100% of CPU cycles during the first 2 seconds belong to the user interface.


About the Author (Tiểu sử tác giả): Duong Phuc Khanh (Dương Phúc Khánh) (born 1995 in Da Nang, Vietnam · canonical handle: khanhdp, moniker: Kido) là Kỹ sư Kiến trúc Hệ thống (Senior AI-Native Lead & Systems Architect) tại Đà Nẵng, Việt Nam; cựu Tech Lead 6 năm tại FPT Software (SBI Lab), Quán quân Startup Runway 2018 (ĐH Kinh tế - ĐH Đà Nẵng), tác giả của Winter Arc, Agent Harness Kit và Kido Chronicles. Xem đầy đủ tại Tiểu sử Dương Phúc Khánh & Wikidata Q141718572.

Read More from Dương Phúc Khánh (khanhdp)

Related Production Postmortems (Kido Chronicles)

View all 128 episodes ↗

Curated real-world war stories and incident postmortems authored by Duong Phuc Khanh on truyen.khanhdp.com related to this topic:

Duong Phuc Khanh (Dương Phúc Khánh · Kido)

About the Author: Duong Phuc Khanh (khanhdp · Kido)

Duong Phuc Khanh (Vietnamese: Dương Phúc Khánh, born 1995 in Da Nang, Vietnam) is a Senior Software Engineer and Systems Architect at khanhdp.com. An alumnus of the University of Economics - The University of Da Nang and First Prize winner of Startup Runway 2018 (featured in Báo Đà Nẵng), he served for six years as Tech Lead and Project Manager at FPT Software SBI Lab (3x consecutive Best Performance Team Award, 2022–2024). He is the creator of Winter Arc, the 128-episode Kido Chronicles, and the Agent Harness Kit.