如何在使用https时启用gzip压缩?

时间:2015-06-24 02:20:40

标签: nginx gzip deflate

如何在使用https时启用gzip压缩?

如何在使用https时启用gzip压缩?

我在http://checkgzipcompression.com/使用了一个工具来验证这一点,我说: " GZIP未启用:( 通过使用GZIP压缩此页面,可以节省66.7%的带宽。"和卷曲显示相同的结果。

以下详细信息:

  

curl -I -H'接受编码:gzip,deflate' HTTP:// ..

HTTP/1.1 301 Moved Permanently
Server: nginx
Date: Wed, 24 Jun 2015 02:00:34 GMT
Content-Type: text/html; charset=iso-8859-1
Content-Length: 20
Connection: keep-alive
Vary: Accept-Encoding
Content-Encoding: gzip
  

curl -I -H'接受编码:gzip,deflate' HTTPS:// ..

HTTP/1.1 200 OK
Server: nginx
Date: Wed, 24 Jun 2015 02:00:41 GMT
Content-Type: text/css
Content-Length: 4778
Last-Modified: Sun, 21 Jun 2015 16:54:59 GMT
Connection: keep-alive
ETag: "5586ec63-12aa"
Expires: Thu, 31 Dec 2037 23:55:55 GMT
Cache-Control: max-age=315360000
Accept-Ranges: bytes

0 个答案:

没有答案