Skip to main content
All rules

PERF-007

Versioned scripts are not cached

MediumDefault severity · Performance · SEO, quality and performance

Last reviewed

What it checks

Cache-Control on same-site scripts whose file names contain a content hash.

Why it matters

Returning visitors download the same JavaScript again on every visit, making every page load slower.

Recommended fix

Serve hashed build files with Cache-Control: public, max-age=31536000, immutable.

How to verify

Request one of the listed files and confirm the long Cache-Control header.

Example fix prompt

Generic prompt (your report adds the evidence)
Please fix this production issue in my app.

Issue PERF-007: Versioned scripts are not cached
Site: https://your-app.example

First confirm the issue in the code or live config. If it is not present, say so and change nothing.
Task: Configure the host to serve fingerprinted build assets (the files in the evidence) with Cache-Control: public, max-age=31536000, immutable, while keeping HTML uncached.

Constraints: make the smallest change that fixes this, keep the current design and behaviour, never paste secret values into code or chat, and tell me which files you changed.
Done when: Request one of the listed files and confirm the long Cache-Control header.

References