Android Web Services: Optimization, Security, and Creation
1. Web Services Optimizations
Network bandwidth is a constraint for mobile devices. To reduce the bandwidth Android apps consume, web services should exploit optimizations available in modern web servers, such as compression and caching.
1.1 Compression
Modern web servers like IIS, Nginx, and Apache’s httpd support gzip compression. Since web services pass around only text, compression can be very effective. The HttpURLConnection object has built - in support for gzip from Gingerbread onwards. When calling getInputStream() on the connection, it automatically adds the Accept - Encoding: gzip HTTP header to the request. As long as the web s
超级会员免费看
订阅专栏 解锁全文
77

被折叠的 条评论
为什么被折叠?



