Responsible JavaScript
summary
Web pages commonly ship hundreds of kilobytes of compressed JavaScript — median ~370 KB, 75th ~650 KB, 90th ≥1 MB — which decompresses and blocks the main thread for 2–6 seconds on low-end devices like a Moto G. Practical fixes include using semantic HTML and server-rendered forms to drop client-side validation, Babel tweaks (useBuiltIns: "usage", loose mode or transform-runtime) to cut bundles ~52%, and differential serving with type="module"/nomodule plus client hints (RTT/downlink/ECT) to adapt payloads and drop 2G load times from ~90s to ~5s.
AI-written summary · about
chapters (10)
- 0:00Introduction and background
- 3:00JavaScript growth and performance impact
- 6:11External consistency in UX
- 9:47Semantic HTML for accessibility
- 13:45JavaScript tools and their flaws
- 17:21Optimizing Babel configurations
- 20:50Differential serving explained
- 24:41Adaptive performance with client hints
- 28:39Building with user needs in mind
- 30:54Q&A session
