I'm making an iPhone application that requests JSON from Heroku.
Am I getting a gzipped response? And, does the iPhone automatically unzip gzipped responses, or do you have to program that in? I'm using
NSURLConnection
asynchronously (with the delegate protocol) as described in the Xcode docs.When I do:
curl -I http://acani.heroku.com/users/4c96ee4f1467281352000049/1234/50/50
I get:
HTTP/1.1 200 OK Server: nginx/0.7.67 Date: Sun, 17 Oct 2010 16:27:25 GMT Content-Type: application/json Connection: keep-alive Content-Length: 11532 X-Varnish: 2314841869 Age: 0 Via: 1.1 varnish
I'm also using the Zimt WebSocket code with AsyncSocket for chat. The chat server is Node.js. Should I be gzipping each chat message? Or is that done automatically?
I wonder, to reduce bandwidth, does Twitter gzip your tweets (with JavaScript on the web, or Objective-C on the iPhone) before they are sent to Twitter?
Thanks!
Matt