0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

nginxのgzipについて

Posted at

nginxのconfigでgzipを設定するとコンテンツがgzip圧縮される。
gzipされた場合はレスポンスヘッダーにContent-Encoding: gzipが表示される。
なお、gzip圧縮されるにはリクエストヘッダーにAccept-Encoding: gzipをつける必要がある。

$ curl -I -H "Accept-Encoding: gzip" localhost
HTTP/1.1 200 OK
Server: nginx/1.14.1
Date: Fri, 11 Dec 2020 14:45:39 GMT
Content-Type: text/html
Last-Modified: Mon, 07 Oct 2019 21:16:24 GMT
Connection: keep-alive
ETag: W/"5d9bab28-fd9"
Content-Encoding: gzip * これ

gzip圧縮により4.0kのレスポンスサイズが1.4kまで減った。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?