Skip to content

Instantly share code, notes, and snippets.

@makeitaboldmove
Last active September 10, 2018 15:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save makeitaboldmove/c47ea4f997750ac3de1953bf005991e2 to your computer and use it in GitHub Desktop.
Save makeitaboldmove/c47ea4f997750ac3de1953bf005991e2 to your computer and use it in GitHub Desktop.
Speed up your website on an nginx server by adding modern gzip_types to nginx.conf in the http block
##
# Gzip Settings
##
gzip on;
gzip_vary on;
gzip_proxied any;
gzip_http_version 1.1;
gzip_disable "msie6";
gzip_static always;
gzip_comp_level 6;
gzip_min_length 1100;
gzip_buffers 16 8k;
gzip_types
application/atom+xml
application/font-sfnt
application/javascript
application/json
application/ld+json
application/manifest+json
application/rss+xml
application/vnd.geo+json
application/vnd.ms-fontobject
application/x-font-opentype
application/x-font-ttf
application-x-font-truetype
application/x-font-woff
application/x-font-woff2
application/x-javascript
application/x-web-app-manifest+json
application/xhtml+xml
application/xml
font/opentype
font/truetype
image/bmp
image/gif
image/jpeg
image/png
image/svg+xml
image/x-icon
text/cache-manifest
text/css
text/javascript
text/js
text/plain
text/vcard
text/vnd.rim.location.xloc
text/vtt
text/x-component
text/x-cross-domain-policy;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment