/
Compress text-based responses with gzip or Brotli to reduce transfer size significantly.
Text-based resources (HTML, CSS, JS, JSON) compress 60-80% with gzip and even better with Brotli. Without compression every byte travels over the wire as-is, slowing FCP and LCP directly.
# nginx — enable gzip + Brotli
gzip on;
gzip_types text/plain text/css application/javascript application/json;
gzip_min_length 1024;
# Brotli (ngx_brotli module)
brotli on;
brotli_types text/plain text/css application/javascript;
# No gzip / Brotli block in nginx.conf
# Responses delivered uncompressed — 3-5x larger than necessary
A meta description improves click-through rate in search results.
main > section.hero > img
<img src="/images/hero.jpg" loading="eager">
|
Type
|
Count
|
Size
|
|---|---|---|
| script | 6 | 498 KB |
| stylesheet | 2 | 98 KB |
| image | 18 | 206 KB |
| font | 4 | 61 KB |
| document | 1 | 28 KB |
|
Entity
|
Transfer
|
Blocking
|
Main thread
|
|---|---|---|---|
| Google Analytics | 23 KB | 60ms | 100ms |
|
URL
|
Type
|
Size
|
Duration
|
|---|---|---|---|
vendor.js
|
371 KB | ||
products
|
24 KB |
app.js
538ms
vendor.js
125ms