Skip to content

Instantly share code, notes, and snippets.

@gmetais
Last active February 28, 2021 14:06
Show Gist options
  • Star 11 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gmetais/971ce13a1fbeebd88445 to your computer and use it in GitHub Desktop.
Save gmetais/971ce13a1fbeebd88445 to your computer and use it in GitHub Desktop.
This is a list of Content-Type / mime-type for a server Gzip/Brotli compression configuration
This list was moved to https://letstalkaboutwebperf.com/en/gzip-brotli-server-config/
@gmetais
Copy link
Author

gmetais commented May 7, 2015

@stefounet
Copy link

based on Fasterize conf:

application/x-font-opentype
application/x-font-truetype
font/opentype
font/otf
image/vnd.microsoft.icon

@gmetais
Copy link
Author

gmetais commented May 7, 2015

The EOT font format is sometime compressed, not always.

The answer is unclear when it comes to Embedded OpenType (eot) fonts. It’s possible to compress EOT font files as part of the file creation process, in which case gzipping them is unnecessary. However, to generate compressed EOT font files requires a special tool and an extra step, so it’s likely that most of them are not pre-compressed. Examining the 460K .eot responses in the HTTP Archive shows that the website owner specifically gzipped them 79% of the time. Therefore, gzipping EOT fonts is a good default.
http://www.fastly.com/blog/new-gzip-settings-and-deciding-what-to-compress/

@jpvincent
Copy link

ma conf en formation perf (+ la syntaxe Apache 2) :

activer mod_deflate mod_headers
SetOutputFilter DEFLATE
DeflateCompressionLevel 9

activer mod_filter

texte (plain), xml, javascript
AddOutputFilterByType DEFLATE text/*

JSON
AddOutputFilterByType DEFLATE application/json application/x-javascript application/javascript

fonts eot, ttf et .ico
AddOutputFilterByType DEFLATE application/vnd.ms-fontobject application/x-font-ttf application/x-font-opentype application/x-font-truetype font/eot font/opentype font/otf

icones
AddOutputFilterByType DEFLATE image/x-icon image/vnd.microsoft.icon

XML
AddOutputFilterByType DEFLATE image/svg+xml application/xhtml+xml application/xml application/rss+xml application/atom_xml

@jpvincent
Copy link

tu avais déjà tout trouvé en fait :)
Je mets juste un wildcard sur text/*

@ojdupuis
Copy link

merci messieurs ! C'est, juste ce que je cherchais

@bor8
Copy link

bor8 commented Jul 31, 2018

Attention, n'utilisez pas de text/* ! Ça ne marche pas. Précisez plutôt text/html etc. explicitement. Ça m'a pris une heure pour comprendre ça.

Achtung, bitte nicht text/* verwenden! Das funktioniert nicht. Lieber text/html usw. explizit angeben. Hat mich ne Stunde gekostet, dass herauszufinden.

Attention, please do not use text/*! This isn't working. Rather specify text/html etc. explicitly. Took me an hour to figure that out.

Apache 2.4.18.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment