Performance · Loading

Inefficient cache policy

This page loads a stylesheet and a font from a folder that is served without a long cache lifetime, so returning visitors download them again.

How this page is built

This paragraph uses a copy of the site font loaded from /media/. Files in /assets/ are served with a cache lifetime of one year, but files in /media/ get the server default of zero, so the browser has to check for a new copy on every visit.

Why it matters

A long cache lifetime lets browsers keep a file and reuse it on later visits without asking the server again. Without one, returning visitors wait for files they already have, and the server handles more requests than it needs to.

Static files such as fonts, stylesheets, scripts and images rarely change. When they do, a new file name or version number tells the browser to fetch the new copy.

How to check it

Run Lighthouse or PageSpeed Insights on the page and look at the diagnostics. Crawl tools that run Lighthouse for each page, or that measure page resources, report the same finding across the site. Lighthouse lists static files with a short cache lifetime. Check the Cache-Control header of each file with curl -I or the network panel.

How to fix it

Serve static files with Cache-Control: public, max-age=31536000, immutable, and add a version or hash to each file name so a change gets a new address.

Back to all tests