Guides · Speed
How to let browsers reuse your files
When someone comes back to your site, their browser can reuse files it saved on the last visit, or it can download them again. Your server tells the browser which to do through a header called Cache-Control.
Your report can raise two separate findings about this. Fixing one does not clear the other.
What the two findings mean
"Browsers are not told how long to keep the page" is about the page itself. Our scan looked at the page's response and found no Cache-Control header. Any Cache-Control value clears this finding.
"Returning visitors download the same files again" comes from Google's speed test. It is about images, scripts and stylesheets with a short lifetime or none. To see the file names, run the same page at pagespeed.web.dev, Google's free test.
Which settings suit which files
Pages change often, so give them a short lifetime or none:
Cache-Control: no-cachelets the browser keep a copy, but it must ask the server whether the page has changed before using it.Cache-Control: max-age=300lets the browser or a CDN reuse a public page for five minutes.Cache-Control: no-storetells the browser to keep nothing. Use it for private pages such as account pages.
Images, scripts and stylesheets change less often, so they can have a long lifetime:
Cache-Control: max-age=2592000is 30 days, a common choice for files whose names stay the same. Google's test may still list them, because it favors longer lifetimes.Cache-Control: max-age=31536000, immutableis one year. Use it only for files with a version in their name, such asapp.3f9a2c.js.
If you replace a file at the same address, returning visitors may see the old one until the long lifetime runs out. Saving the new file under a new name avoids this.
How to set them
On WordPress, the settings usually live with your host or in a cache plugin. SEO plugins such as Yoast and Rank Math do not handle them. Many hosts offer the setting in their control panel, and it may also be in your CDN.
If you have a developer or host, you can ask them to do this:
- Send a Cache-Control header with every page: a short value above for public pages, and no-store for account, cart and checkout pages.
- Send a long lifetime for images, scripts and stylesheets.
- Use the one-year value for files with versioned names.
Shopify, Wix and Squarespace manage these headers themselves, and their owners usually cannot change them. Wix says it caches site resources automatically on its CDN.
On any platform, some files that test names may come from other companies, such as analytics tools, chat widgets or store apps. Those companies set the lifetimes, so you can only keep the tool or remove it.
How to check
- Open your page in Chrome, then open the developer tools and go to the Network tab.
- Click a file and read Cache-Control under its response headers.
- Visit the page again from a new tab. Reused files show "disk cache" or "memory cache" in the Size column.
Then press Rescan on your report to run both checks again.