# How to set long cache lifetimes for static files

> Images, fonts, CSS and scripts rarely change. Telling browsers to keep them for a year makes every repeat visit faster.

Speed & Core Web Vitals · HTML version: https://getreport.app/learn/cache-ttl

## Static file caching

Passing looks like: Static files have long cache lifetimes.

**Why it matters.** Images, fonts, CSS and JS rarely change, yet without a long Cache-Control lifetime returning visitors download them again on every page.

**How to fix it.**

1. Set Cache-Control max-age of a year on versioned static files (most CDNs and caching plugins have a "browser caching" switch).
2. Add a version or hash to file names so you can still change them.

Check your own page: https://getreport.app/
