Recall & Review
beginner
What is Gzip compression in the context of nginx?
Gzip compression is a method used by nginx to reduce the size of files sent from the server to the client, making web pages load faster by compressing text-based content like HTML, CSS, and JavaScript.
Click to reveal answer
beginner
Which nginx directive enables Gzip compression?
The directive
gzip on; enables Gzip compression in the nginx configuration.Click to reveal answer
intermediate
What does the
gzip_types directive do in nginx?The
gzip_types directive specifies which MIME types should be compressed by Gzip, such as text/html, application/javascript, and text/css.Click to reveal answer
beginner
How can you check if Gzip compression is working on your website?
You can check Gzip compression by using browser developer tools or online tools that inspect response headers for
Content-Encoding: gzip, indicating the content is compressed.Click to reveal answer
intermediate
What is the purpose of the
gzip_min_length directive?The
gzip_min_length directive sets the minimum size of a response that will be compressed. Responses smaller than this size will not be compressed to avoid overhead.Click to reveal answer
Which nginx directive turns on Gzip compression?
✗ Incorrect
The correct directive to enable Gzip compression in nginx is
gzip on;.What type of content is typically compressed by Gzip in nginx?
✗ Incorrect
Gzip compression is effective for text-based files such as HTML, CSS, and JavaScript, not for images or videos.
Which header indicates that the response is compressed with Gzip?
✗ Incorrect
The header
Content-Encoding: gzip shows that the response is compressed using Gzip.What does the
gzip_min_length directive control?✗ Incorrect
gzip_min_length sets the minimum size of a response to be compressed.If you want to compress JSON responses, which directive should you configure?
✗ Incorrect
To compress JSON, add
application/json to the gzip_types directive.Explain how to enable and configure Gzip compression in nginx for a website.
Think about the main directives and the steps to activate compression.
You got /4 concepts.
Describe how you can verify that Gzip compression is working correctly on your web server.
Focus on tools and headers that show compression status.
You got /3 concepts.