Most software is written on the assumption of a fast, open, reliable internet. In Iran that assumption fails in specific ways, and the failures are predictable enough to design against.
This is what we have learned building for this market, and it applies to any environment with constrained or filtered connectivity.
1. Foreign CDNs are a liability, not an optimisation
A CDN is normally the right call: the nearest edge serves the file, and it is probably already cached in the browser.
Here, reachability of those domains is unpredictable — sometimes fast, sometimes slow, sometimes not at all. And the failure mode is the expensive part: stylesheets and fonts block rendering. A CSS file from an unreachable host means the browser waits for the connection to time out, showing a blank page for seconds.
The fix is unglamorous: serve every font, stylesheet and script from your own origin. You lose shared browser cache and add a few hundred kilobytes to your server. You gain predictability, which is worth more.
In one shop we built, "zero foreign CDN dependencies" is one of the four headline facts of the project. That is not a boast about purity; it is the difference between "fast" and "sometimes fast".
2. Offline detection lies
The browser's online flag, and the usual "ping a well-known host" trick, both answer the wrong question. A device can have a perfectly good connection to your server while a well-known foreign host is unreachable — and your app will report itself offline and refuse to work.
Probe your own server, not a third party. In a municipal field-reporting app, the reachability check is tuned against the organisation's own API precisely so that filtering elsewhere does not make the system announce itself as offline. Officers in the field lost work to that failure mode before it was fixed.
3. Uploads must be resumable
A two-gigabyte video or eighty photographs over a domestic connection will be interrupted. A plain upload that restarts from zero is not a slow feature, it is an unusable one — the user gives up on the third attempt.
Chunked upload with resume from the last completed chunk. In a newsroom platform we built, this is what makes an eighty-image photo report practical; in an education platform, it is what allows a 2 GB lesson video to arrive at all.
Pair it with an offline queue for anything captured in the field: the report is written locally and syncs when the network returns, rather than being lost.
4. App distribution cannot assume a store
Google Play is not reliably available. Two workable answers:
Sideload with in-app update. The app checks your own server for a new version, downloads and installs it, with support for forced updates. This is what we did for a municipal field app, and it removes the store from the loop entirely.
A progressive web app. Installable from the browser to the home screen, with a service worker for offline and Web Push for notifications. For a clinic booking system this had a second benefit: appointment reminders over Web Push cost nothing, where SMS is a monthly bill.
The general principle
Every one of these is the same lesson in a different costume: do not depend on something you do not control when the failure mode is severe. That is good engineering everywhere. Here it is simply not optional.
If you are building for this market — or evaluating a team that does — our engineering practice is built around these constraints.





Comments
No comments yet. Be the first.