Titanium Community Questions & Answer Archive

We felt that 6+ years of knowledge should not die so this is the Titanium Community Questions & Answer Archive

GZIP encoding of XHR

Does Titaniums XHR natively support GZIP compression? Is there anything special I need to do?

— asked November 30th 2010 by Bruce Elgort
  • gzip
  • xhr

2 Answers

  • XHR has a default Accept-Encoding=gzip under iphone 4.3 emulator. It works, receives gzip encoded data (provided that the server supports it) and retrieves it on xhr.responseText and also on xhr.responseXml if the answer is a well formed xml document.

    On android though, xhr doesn't decompress the gzip encoded data and xhr.responseText and xhr.responseXml both return null.

    Does anybody know if appcelerator plans to support gzip http encoding on android too?

    — answered March 30th 2011 by Sebastian Castro
The ownership of individual contributions to this community generated content is retained by the authors of their contributions.
All trademarks remain the property of the respective owner.