We moved this page to our Documentation Portal. You can find the latest updates here. |
Question
Gzip Compression
Environment
OnApp CDN
Answer
Due to Nginx limitations, file extensions are not supported for gzip. It supports only specific mime types (Content-Type header returned from the origin). You could change the mime types on the origin using parameters from the list below.
We have a whitelist of mime types we automatically gzip on-demand at the edge servers. We are happy to include any mime types that are not included in this list but can be compressed further.
The mime types in the whitelist can be requested in either a gzip or non gzip format based on the headers passed. The reason why it is based on headers passed is serving compressed content without the client requesting it and risks of breaking client/browser that do not handle "Content-Encoding: gzip" properly.
Currently the whitelist is:
text/compressible
text/html
text/xml
text/javascript
text/css
application/x-javascript
text/xml
application/xml
application/xml+rss
application/json
application/javascript
image/svg+xml
image/x-icon
image/vnd.microsoft.icon
application/x-font-ttf
application/vnd.ms-fontobject
application/x-font-opentype
application/x-font-truetype
application/x-font-ttf
font/eot
font/opentype
font/otf;
"gzip_min_length" defaults to 1000.
Note that origin must include "Content-Type" in response header in order for the gzip feature to work.