Recall & Review
beginner
What is Brotli compression in the context of nginx?
Brotli compression is a method to reduce the size of files sent from the server to the browser, making websites load faster. In nginx, it compresses responses before sending them to clients.
Click to reveal answer
beginner
Which nginx module is used to enable Brotli compression?
The ngx_brotli module is used to enable Brotli compression in nginx. It must be installed and configured to compress responses.
Click to reveal answer
intermediate
How do you enable Brotli compression for text and HTML files in nginx?
You enable Brotli by adding directives like 'brotli on;' and specifying file types with 'brotli_types text/plain text/css application/javascript text/html;' in the nginx configuration.
Click to reveal answer
intermediate
What is the benefit of using Brotli compression over gzip?
Brotli often compresses files to a smaller size than gzip, which means faster page loads and less data usage for users, improving website performance.
Click to reveal answer
beginner
What must you check before enabling Brotli compression in nginx?
You must check that the ngx_brotli module is installed and that your nginx version supports it. Also, ensure clients support Brotli compression.
Click to reveal answer
Which nginx directive turns on Brotli compression?
✗ Incorrect
The correct directive to enable Brotli compression in nginx is 'brotli on;'.
What file types are commonly compressed with Brotli in nginx?
✗ Incorrect
Brotli is typically used to compress text-based files such as HTML, CSS, and JavaScript to reduce size.
What is a key advantage of Brotli over gzip?
✗ Incorrect
Brotli usually compresses files to a smaller size than gzip, which helps websites load faster.
Before enabling Brotli, what should you verify?
✗ Incorrect
You must ensure the ngx_brotli module is installed in nginx before enabling Brotli compression.
Which nginx directive specifies which file types Brotli compresses?
✗ Incorrect
The 'brotli_types' directive tells nginx which MIME types to compress using Brotli.
Explain how to enable Brotli compression in nginx and why it improves website performance.
Think about the module, configuration lines, and the effect on file size and speed.
You got /5 concepts.
Describe the differences between Brotli and gzip compression in nginx.
Compare how well and fast each compresses and their compatibility.
You got /5 concepts.