Article · 20 min read
The Cost Of JavaScript
Addy Osmani · Addy Osmani (Dev Channel, Medium) Free Intermediate
Every kilobyte of JavaScript costs far more on a cheap phone than on your machine, because the phone has to download it and then grind through parsing it on a weak CPU. Osmani shows the 2 to 5x difference in parse time between a flagship and an average phone, and gives concrete ways to ship less. This is the case for keeping your app light, backed by measurements rather than opinion.
- Download size and CPU parse time both punish low end devices twice over
- Ship less code first, then defer and split what remains
- Measure on a real budget phone, not on your dev machine