Performance

Cache headers

Checks Cache-Control, ETag and Expires response headers.

Why does this matter?

Good cache headers ensure browsers store static files and don't need to re-download them on every visit. This dramatically speeds up returning visitors and reduces server load.

How to fix it?

Set Cache-Control: max-age=31536000 for static files (CSS, JS, images). Use ETag for dynamic pages. Add Vary: Accept-Encoding for compressed responses.

This check scores from 0 to 100. Below 50 is a fail, 50 to 89 is a warning, 90 or above is good. After each crawl you see the score per page in your report, with a short note on what we found.

Frequently asked questions

Checks Cache-Control, ETag and Expires response headers.

Good cache headers ensure browsers store static files and don't need to re-download them on every visit. This dramatically speeds up returning visitors and reduces server load.

Set Cache-Control: max-age=31536000 for static files (CSS, JS, images). Use ETag for dynamic pages. Add Vary: Accept-Encoding for compressed responses.

Example

Copy the code below and adapt the domain name, brand name and content to your situation.

# Nginx: cache headers for static files
location ~* \.(css|js|woff2|png|jpg|webp|avif|ico)$ {
    expires 1y;
    add_header Cache-Control "public, max-age=31536000, immutable";
}

# HTML pages: no caching (or short TTL)
location ~* \.html$ {
    add_header Cache-Control "no-cache, must-revalidate";
}

# Apache .htaccess
<FilesMatch "\.(css|js|woff2|png|jpg|webp)$">
    Header set Cache-Control "public, max-age=31536000, immutable"
</FilesMatch>
Start free