3 ms·
Ask HN: Mobile dev...large JSON or multiple requests?
When doing mobile development is it better to return a large JSON object with all the referential data or to make multiple requests to get the data. Also what is considered a large JSON response for mobile.
Thanks.
- cleverjake 14y agoDepends on a lot of things. Where will the users be? If they are in america/western europe/japan/korea, etc, mobile download speed is usually pretty fast, but the latency can be killer. In this case, I would tend to go more towards one large JSON request. The only reason I wouldn't is if it was something that requires a lot of communication (a chat app, for instance). In that case, since it is a high frequency of updates, I would work on making those updates as small as possible. If it is a lot of users in poorly connected areas, where data is super expensive, just cut everything down as absolutely small as possible. also - remember to remove all unnecessary whitespace and turn on compression on your server.