Performance

Cache headers

Checks Cache-Control, ETag and Expires response headers.

Warum ist das wichtig?

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.

Wie beheben Sie es?

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

Dieser Check bewertet von 0 bis 100. Unter 50 ist ein Fail, 50 bis 89 eine Warnung, 90 oder höher ist gut. Nach jedem Crawl sehen Sie die Note pro Seite im Report, mit einer kurzen Erklärung.

Häufige Fragen

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.

Beispiel

Kopieren Sie den Code unten und passen Sie Domain, Markenname und Inhalt an Ihre Situation an.

# 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>
Kostenlos starten