Tutorial Example

Detect Site Enable GZIP or not with Curl – Curl Tutorial

GZIP can compress the size of page, which can speed up the website.

How to check a site enable gzip or not?

In this tutorial, we will use curl to check.

The command is:

curl -H “Accept-Encoding: gzip” -I site_url

Example 1:

curl -H "Accept-Encoding: gzip" -I https://www.tutorialexample.com

The result is:

From the result, we do not find any gzip information, so our site disable gzip.

Example 2:

curl -H "Accept-Encoding: gzip" -I https://www.taobao.com

The result is:

From the result, we find a content-encoding:gzip response header, which means taobao.com enable gzip.