[TIMOB-2698] Support for "Accept-Encoding","gzip,deflate"
GitHub Issue | n/a |
---|---|
Type | New Feature |
Priority | Medium |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2011-11-15T07:19:24.000+0000 |
Affected Version/s | Release 1.6.0 |
Fix Version/s | Sprint 2011-43, Release 1.8.0.1 |
Components | Android |
Labels | android, feature |
Reporter | Ralf Pfeiffer |
Assignee | Hieu Pham |
Created | 2011-04-15T03:27:21.000+0000 |
Updated | 2017-03-16T22:23:52.000+0000 |
Description
It appears that gzip headers arent currently supported.
xhr.setRequestHeader("Accept-Encoding","gzip,deflate");
Any chance of adding this? Thx!
http://stackoverflow.com/questions/1573391/android-http-communication-should-use-accept-encoding-gzip"> Possibly useful thread regarding supporting gzip compression on Android.
Associated Helpdesk Ticket
http://appc.me/c/APP-292662Bump. Would be a nice addition in 1.8
Folks this feature has been requested for over 6 months now. Gzipping on a slower network is key. Any chance to add this on in 1.8?
Any news on this is possible?
Would like to know if this is possible.
Steps to test: 1. Run the snippet
2. Run the snippet with and without this line and make sure content is identical
3. Since the json file we're getting info from is very small, you would not see performance difference, which is the main reason for gzipping. Perhaps feed in a bigger json thats 100k-200k large.
Keep up the good work on this, Hieu - it will be such a valuable addition.
I have evidence that this is working properly. 1. Upload the following to a public folder in your Dropbox: ~/Library/Applucation\ Support/Titanium/mobilesdk/1.8.0.1/api.jsca Dropbox supports gzip, and api.jsca is a 14mb JSON text file. 2. Drop the below snippet in an app.js and try it out. On my connection, I download the file in about 1.2 seconds. 3. For testing iOS, comment out gzip support in the SDK itself and try again. Also remove the setRequestHeader in your app.js. I averaged 8 seconds per download. We can extrapolate from this that gzip is transmitting a payload 15% the size of the uncompressed version. (Results may vary depending upon the data being transmitted.)
it would be nice if 'Accept-Encoding: gzip,deflate' is added by default, because this is the behaviour when compiling for iOS
Closing ticket as fixed.