Building web apps that work on 3G and a mid-range Android
Most of our users are on mid-range phones and patchy networks. Here is the checklist we use so every page loads in seconds.
1 min read
Most people who use the software we build in Rwanda are on a mid-range Android phone, often on 3G or a busy 4G network. If a page needs ten seconds to become usable, many of them simply leave. So we design for that phone first.
Start with a budget
Every page has a JavaScript budget, measured in CI on the production build. If a change pushes a page over the limit, the build fails. It is much easier to stay fast than to become fast later.
Render on the server
Text, images and buttons arrive as HTML. The page is readable and usable before any JavaScript runs. Interactive parts load as small islands.
Forms that survive bad networks
- Forms submit even if JavaScript has not loaded yet.
- Drafts are saved on the device, so a dropped connection does not lose an application.
- Errors are shown next to each field and summarised at the top.
Test on the real phone
Emulators help, but nothing replaces a real mid-range phone on a real network. We keep a small device lab in the Coding Hub and test every release on it.