# How to set cache headers for static files

> Cache-Control tells browsers how long to keep a file. Long lifetimes with versioned filenames make repeat visits instant.

Best practices · HTML version: https://getreport.app/learn/cache-headers

## Cache lifetime for static files

Passing looks like: Static files have a cache lifetime.

**Why it matters.** Without a cache lifetime, every visit downloads the same logo, CSS and scripts again. Returning visitors should get them from their browser in 0 ms.

**How to fix it.**

1. Send Cache-Control: public, max-age=31536000, immutable for versioned images, CSS, JS and fonts.
2. Most caching plugins and CDNs set this for you; check the "browser cache" or "edge TTL" setting.

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