Skip to content
DevMarDe
Crawl Audit check 91Crawl AuditPerformance

Cache-Control for static files: Crawl Audit check 91

Crawl Audit check 91 tests how long browsers may keep your CSS, scripts and images. Google's 30-day guidance, hashed file names, and a free-check limit.

Zain Kazmi2 min read
On this page
Check
91 of 200
Module
Performance & Core Web Vitals
Group
Caching, CDN & Infrastructure Speed
Impact
Medium

Short answer: the Cache-Control header tells a browser how long it may reuse a file without downloading it again. Static files, such as CSS, scripts, fonts and images, should be kept for a long time, so returning visitors and the next page load faster. Check 91 passes when a static file is cached for 30 days or more.

What Crawl Audit checks

  • Full report: Crawl Audit requests one of your static files and reads its max-age. Pass at 30 days (2,592,000 seconds) or more; warning if shorter or missing.
  • Free check: Crawl Audit reads the header on the HTML page itself and looks for a long max-age.

That free-check test has a flaw we've reported to the Crawl Audit team. HTML pages are usually, and rightly, set not to cache (max-age=0), so the free check can warn on a site whose static files are cached for a year. devmarde.com is one: our HTML has max-age=0, must-revalidate, and our CSS has public,max-age=31536000,immutable. Until it's fixed, trust the full report on this one.

What Google says

  • Chrome's Lighthouse 13 guidance: "All cacheable subresource requests should have a cache lifetime of at least 30 days (2592000 seconds)." And: "cacheable resources should have a very long lifetime (30 days or 1 year)."
  • The catch with long caching is that visitors might not see updates. The fix is "to embed a hash in your static asset filenames so that each version is unique".
  • MDN: "When you use a cache-busting pattern for resources and apply them to a long max-age, you can also add immutable to avoid revalidation."
Cache-Control: public, max-age=31536000, immutable

On your platform

  • Vercel and Next.js: hashed static files get max-age=31536000, immutable; Vercel notes "Frameworks like Next.js set this automatically."
  • Shopify: "Shopify sets browser caching for cacheable resources to one year".
  • Wix and Squarespace: caching of the platform's files isn't something you control.
  • WordPress or your own server: a caching plugin, your host's panel, or nginx or Apache rules. Only cache for a year if file names change when the files do.

Sources

All 200 Crawl Audit checks

See how your site does on every check.

Crawl Audit runs this check and 199 others on your domain. The full report is $7.89, one time. The free check on this site covers 25.