0
0
Nginxdevops~5 mins

Brotli compression in Nginx - Cheat Sheet & Quick Revision

Choose your learning style9 modes available
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?
Abrotli_enable yes;
Bbrotli on;
Ccompress on;
Dgzip on;
What file types are commonly compressed with Brotli in nginx?
AImages like PNG and JPEG
BBinary executables
CText files like HTML, CSS, and JavaScript
DVideo files
What is a key advantage of Brotli over gzip?
ABrotli only works on images
BBrotli compresses faster but less effectively
CBrotli is supported by fewer browsers
DBrotli compresses files smaller, improving load times
Before enabling Brotli, what should you verify?
AThat the ngx_brotli module is installed
BThat gzip is disabled
CThat the server is running Windows
DThat images are compressed
Which nginx directive specifies which file types Brotli compresses?
Abrotli_types
Bbrotli_files
Ccompress_types
Dgzip_types
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.