login community faq

I saw in a previous question that responses for static files served by nginx are gzip compressed when possible. Will nginx also gzip responses from custom applications when possible? Or would the custom application need to do the gzipping itself? Thanks.

asked Jun 09 '12 at 01:26

Duke's gravatar image

Duke
52


POSTs would have to be gziped by the client application and the server application would have to know what to do with them as well.

answered Jun 09 '12 at 01:37

johns's gravatar image

johns ♦♦
340427

Right, I understand nginx wouldn't decompress gzipped requests before forwarding to the custom application. But if nginx sees that a client accepts gzip responses, will it gzip the response from the custom application?

(Jun 09 '12 at 03:15) Duke Duke's gravatar image

Only if the response type matches nginx's gzip_types. For example: text/plain, text/css, application/x-javascript, text/xml, application/javascript, application/xml, application/xml+rss, text/javascript, application/json

(Jun 09 '12 at 08:17) timg ♦♦ timg's gravatar image

Great, thanks, I'll give it a try.

(Jun 09 '12 at 08:59) Duke Duke's gravatar image
Your answer
If you have an answer to the above question, then use the form below. Otherwise, use the appropriate 'add new comment' button above to post your feedback.
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Tags:

×127
×37
×32
×4

Asked: Jun 09 '12 at 01:26

Seen: 641 times

Last updated: Jun 09 '12 at 08:59

Plans & prices    Sign up    Why WebFaction?    Contact us    Affiliate program    Support    Legal    Jobs    Blog    Control panel login
Powered by OSQA
© Copyright 2003-2012 Swarma Limited - WebFaction is a service of Swarma Limited