Re: gzip не сжимает text/html

Дима Редмайн redmine24 at gmail.com
Fri May 15 09:43:11 UTC 2015


добавьте в gzip_types text/html

On Fri, May 15, 2015 at 3:13 AM, dima40985 <nginx-forum at nginx.us> wrote:

> Всем привет
>
> Проблема такая
>
>
> Включен gzip
>
>     gzip            on;
>     gzip_min_length 1000;
>     gzip_proxied    any;
>     gzip_types      text/plain text/css application/json
> application/x-javascript text/xml application/xml application/xml+rss
> text/javascript       application/javascript;
>     gzip_comp_level 4;
>
>
>
> Сжимает CSS и JS. Все супер
>
>
> Connection:keep-alive
> Content-Encoding:gzip
> Content-Type:text/css
> Date:Fri, 15 May 2015 00:08:03 GMT
> Last-Modified:Wed, 13 May 2015 23:09:30 GMT
> Server:nginx
> Transfer-Encoding:chunked
>
>
> Connection:keep-alive
> Content-Encoding:gzip
> Content-Type:application/javascript; charset=utf-8
> Date:Fri, 15 May 2015 00:08:03 GMT
> Last-Modified:Wed, 13 May 2015 23:09:28 GMT
> Server:nginx
> Transfer-Encoding:chunked
>
>
> Но не сжимает html
>
> Cache-Control:public, max-age=3600
> Connection:keep-alive
> Content-Type:text/html; charset=UTF-8
> Date:Fri, 15 May 2015 00:08:03 GMT
> Last-Modified:Thu, 14 May 2015 21:59:42 GMT
> Pragma:
> Server:nginx
> Transfer-Encoding:chunked
>
>
> Хотя если выполнить wget с аналогичными броузерными заголовками, то все в
> порядке - приходит такой ответ
>
> ---request begin---
> GET / HTTP/1.1
> User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML,
> like Gecko) Chrome/42.0.2311.135 Safari/537.36
> Accept: */*
> Host: ****************
> Connection: Keep-Alive
> Accept-Encoding: gzip, deflate, sdch
> Cache-Control: no-cache
> Referer: *****************
> Pragma: no-cache
>
> ---request end---
> HTTP request sent, awaiting response...
> ---response begin---
> HTTP/1.1 200 OK
> Server: nginx
> Date: Thu, 14 May 2015 23:24:37 GMT
> Content-Type: text/html; charset=UTF-8
> Transfer-Encoding: chunked
> Connection: keep-alive
> Pragma:
> Cache-Control: public, max-age=3600
> Last-Modified: Thu, 14 May 2015 21:59:42 GMT
> Content-Encoding: gzip
>
>
> Если кто в курсе подскажите пожалуйста. Второй день уже копаю. Результата
> ноль
>
> Posted at Nginx Forum:
> http://forum.nginx.org/read.php?21,258883,258883#msg-258883
>
> _______________________________________________
> nginx-ru mailing list
> nginx-ru at nginx.org
> http://mailman.nginx.org/mailman/listinfo/nginx-ru
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.nginx.org/pipermail/nginx-ru/attachments/20150515/4770ce31/attachment.html>


Подробная информация о списке рассылки nginx-ru