A significant and growing number of apps rely on external data from remote servers or other external APIs. At some point youâ€™ll be developing an app that downloads data in XML, JSON, HTML or some other text format.
The problem is that the network condition cannot be relied upon when it comes to mobile devices. A user can be on an EDGE network one minute, and the a 3G network the next. Whatever the scenario, you donâ€™t want to keep your user waiting!
One option to reduce the file size and speed up the download of network-based resources is by enabling GZIP compression on both your server and on your client. This is especially useful for text-based data, which has a high potential ratio for compression.
The good news is that iOS already supports GZIP compression by default if youâ€™re using NSURLConnection, or a framework built on top of it such as AFNetworking. Even more good news is that some cloud providers, such as Google App Engine already send compressed responses.
Thereâ€™s a great article about GZIP compression which explains how to enable it on your Apache or IIS server.
You must log in to post a comment.