Welcome! Log In Create A New Profile

Advanced

Gzipping xhtml pages

Dave Kennard
November 27, 2009 08:32AM
I'm having trouble in getting Nginx to gzip my pages that are served as
application/xhtml+xml

In my nginx.conf http block I have the following:
/ gzip on;
gzip_comp_level 3;
gzip_proxied any;
gzip_types text/plain text/html text/css application/x-javascript
text/xml application/xml application/xhtml+xml application/xml+rss
text/javascript;//

/In mime.types I commented out the existing xhtml entry and added
/ application/xhtml+xml xhtml;/
//
So a plain text file with .xhtml extension is served with content-type
application/xhtml+xml, but it is not being gzipped for some reason? CSS
and javascript are being gzipped okay though.

The response headers for my test xhtml page look like this:
/HTTP/1.1 200 OK
Server: nginx
Date: Fri, 27 Nov 2009 13:23:33 GMT
Content-Type: application/xhtml+xml
Connection: keep-alive
Content-Length: 11
Last-Modified: Fri, 27 Nov 2009 13:13:42 GMT
Accept-Ranges: bytes/

Can anyone help me get my pages gzipped with content type header of
/application/xhtml+xml/?

Thanks

Dave
_______________________________________________
nginx mailing list
nginx@nginx.org
http://nginx.org/mailman/listinfo/nginx
Subject Author Posted

Gzipping xhtml pages

Dave Kennard November 27, 2009 08:32AM

Re: Gzipping xhtml pages

Igor Sysoev November 27, 2009 08:38AM

Re: Gzipping xhtml pages

Dave Kennard November 28, 2009 07:08AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 106
Record Number of Users: 6 on February 13, 2018
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready