When JavaScript Bytes
summary
JavaScript is byte‑for‑byte the costliest resource: median mobile sites send ~378 KB compressed (≈1.8 MB on‑device), Chrome data shows 1.7 MB AGC vs 1.8 MB median site to make the point. Compression gaps (67% gzip, 16% Brotli, 17% uncompressed), long‑task pain (mobile P90 ≈14 s, React P90 ≈28 s), and script‑streaming limits (start parsing ≈30 KB) drive concrete targets: keep entry bundles ~50–100 KB and total JS ≈100 KB. Use Webpack‑bundle‑analyzer, Bundlephobia/cli, import‑cost, PerformanceObserver (long tasks); one case drops a vendor bundle 2.6 MB → 898 KB (66% reduction) by swapping AWS SDK imports and externals.
AI-written summary · about
chapters (9)
- 0:00Margaret Hamilton
- 5:47Network
- 10:55Bratli
- 14:21Device
- 18:28Long Tasks
- 24:14How much is too much
- 26:14Test devices
- 32:44Reduce bundle size
- 46:29Questions








