Title: Json api-&gt; iphone, enable gzip?
Last modified: August 21, 2016

---

# Json api-> iphone, enable gzip?

 *  [DJElo](https://wordpress.org/support/users/djelo/)
 * (@djelo)
 * [12 years, 5 months ago](https://wordpress.org/support/topic/json-api-iphone-enable-gzip/)
 * Hey, thanks for the great api 🙂
    I am having bit of an issue in that I want 
   to optimise the downloading so gzip would be great. But for some reason when 
   I make requests via the iphone (tested on both iOS 6/7) I don’t get gzip content
   back. this is the header for the request: GET /?json=get_recent/posts&count=10
   HTTP/1.1 Host: snowbrains.com Accept-Encoding: gzip, deflate Accept: text/html,
   application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8 Accept-Language: en-us 
   Connection: keep-alive User-Agent: Mozilla/5.0 (iPhone; CPU iPhone OS 6_1 like
   Mac OS X) AppleWebKit/536.26 (KHTML, like Gecko) Version/6.0 Mobile/10B141 Safari/
   8536.25
 * response:
    HTTP/1.1 200 OK Date: Sat, 30 Nov 2013 10:47:48 GMT Server: Apache
   X-Pingback: [http://snowbrains.com/xmlrpc.php](http://snowbrains.com/xmlrpc.php)
   Vary: User-Agent Keep-Alive: timeout=5, max=100 Connection: Keep-Alive Transfer-
   Encoding: chunked Content-Type: application/json; charset=UTF-8
 * but when I run the same query via safari with fake user-agent on os x I get instead:
   
   GET /?json=get_recent_posts&count=10&dev=1 HTTP/1.1 Accept: text/html,application/
   xhtml+xml,application/xml;q=0.9,*/*;q=0.8 User-Agent: Mozilla/5.0 (Macintosh;
   Intel Mac OS X 10_9) AppleWebKit/537.71 (KHTML, like Gecko) Version/7.0 Safari/
   537.71 Accept-Language: en-us Accept-Encoding: gzip, deflate Connection: keep-
   alive
 * and response :
    HTTP/1.1 200 OK Date: Sat, 30 Nov 2013 10:49:21 GMT Server: Apache
   Expires: Wed, 11 Jan 1984 05:00:00 GMT Cache-Control: no-cache, must-revalidate,
   max-age=0 Pragma: no-cache Vary: Accept-Encoding Content-Encoding: gzip Keep-
   Alive: timeout=5, max=96 Connection: Keep-Alive Transfer-Encoding: chunked Content-
   Type: text/plain; charset: UTF-8
 * I know I can get gzip content as when I use the jetpack json api calls I always
   get back gzip content.
    Anyone who can help me figure this out please?
 * [http://wordpress.org/plugins/json-api/](http://wordpress.org/plugins/json-api/)

The topic ‘Json api-> iphone, enable gzip?’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/json-api.svg)
 * [JSON API](https://wordpress.org/plugins/json-api/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/json-api/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/json-api/)
 * [Active Topics](https://wordpress.org/support/plugin/json-api/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/json-api/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/json-api/reviews/)

## Tags

 * [json](https://wordpress.org/support/topic-tag/json/)

 * 0 replies
 * 1 participant
 * Last reply from: [DJElo](https://wordpress.org/support/users/djelo/)
 * Last activity: [12 years, 5 months ago](https://wordpress.org/support/topic/json-api-iphone-enable-gzip/)
 * Status: not resolved