0
0
Nginxdevops~10 mins

Brotli compression in Nginx - Interactive Code Practice

Choose your learning style9 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the code to enable Brotli compression in nginx.

Nginx
brotli [1] on;
Drag options to blanks, or click blank then click option'
Aenable
Bactive
Con
Dtrue
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'enable' instead of 'on' causes a syntax error.
Using 'true' is not valid in nginx configuration.
2fill in blank
medium

Complete the code to set the Brotli compression level to maximum.

Nginx
brotli_comp_level [1];
Drag options to blanks, or click blank then click option'
A11
B7
C5
D9
Attempts:
3 left
💡 Hint
Common Mistakes
Setting level to 11 causes nginx to fail to start.
Using a low level reduces compression efficiency.
3fill in blank
hard

Fix the error in the Brotli types configuration line.

Nginx
brotli_types [1];
Drag options to blanks, or click blank then click option'
Atext/html application/javascript application/json
Btext/html, application/javascript, application/json
Ctext/html; application/javascript; application/json
Dtext/html|application/javascript|application/json
Attempts:
3 left
💡 Hint
Common Mistakes
Using commas causes nginx to reject the config.
Using semicolons or pipes is invalid syntax.
4fill in blank
hard

Fill both blanks to configure Brotli to compress responses larger than 1KB and enable it for HTTPS only.

Nginx
brotli_min_length [1];
brotli_https [2];
Drag options to blanks, or click blank then click option'
A1024
B2048
Con
Doff
Attempts:
3 left
💡 Hint
Common Mistakes
Setting minimum length too low causes unnecessary compression.
Using 'off' disables Brotli for HTTPS.
5fill in blank
hard

Fill all three blanks to complete the Brotli configuration block that enables Brotli, sets compression level to 6, and compresses HTML and CSS files.

Nginx
brotli [1];
brotli_comp_level [2];
brotli_types [3];
Drag options to blanks, or click blank then click option'
Aon
B6
Ctext/html text/css
Doff
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'off' disables Brotli.
Setting compression level too high may slow down the server.
Incorrect MIME types cause no compression.