Just wanted to know if it is better to have "Accept-Encoding", "gzip" in request headers while making HTTP request in android?
If not then in which cases it is not preferable? Also can it be used for requests returning XML or JSON as response?
Thanks in advance!
The gzip encoding is used to cut down the size of the data being transmitted over the netwrok. It compresses it into a zip and gives you a smaller compressed version which in turn reduces bandwidth usage and makes for faster programs. So i would say there is no harm in adding the
"gzip"tag as it would definitely speed up thegetprocess in most cases. A good site you should probably look at:Is this
And yes. It can be used with xml.
Some of the issues are
compressed further.
should not be an issue for you.