I was creating a test page for myself to see what would trigger a strict xml parsing mode, and I came across an interesting piece of information.
My host seems to be compressing text/html, but not application/xhtml+xml.
If you would like to view this for yourself, point your browser to
http://m-p-w.org/projects/content/?xhtml
and
http://m-p-w.org/projects/content/?html
and view the results using using Chrome’s inspector or Firebug.
I suppose my question is, “What kind of speed tradeoffs am I looking at? If compression is truly faster (as it would seem to be, since compression is the default), how can I force compression of certain content-types?”
This looks to be the relevant manual page: http://wiki.nginx.org/NginxHttpGzipModule
Note
text/htmlis always compressed. Other mime types need to be set on thegzip_typesproperty.By the way, according to HTML5, XML parsing mode should be used when the MIME type is