bryanhamilton.info / open source / stale-asset-audit

stale-asset-audit

one PHP file that finds pages serving a cached asset under an old ?v= cache key; zero dependencies, CI-friendly exit codes

In brief: stale-asset-audit is part of the open-source set extracted from the production code of The DJ Calendar (~1,000 structured-data pages, shipping since 2015). Built to run on cheap shared hosting with zero build step. View the code on GitHub →

The problem it fixes

Multi-page sites version their CSS and JS with ?v=N cache busters. Bump passes tend to be page-local: the page you edited gets ?v=48, the other 83 pages keep ?v=33. Every stale page then loads the current asset file - but returning browsers hold their cached copy under the old key, so the deployed code never actually runs there. No error, no warning. This scanner was extracted from a production site where 84 pages had drifted over three months of page-local bumps.

What it does

Usage

One file, no dependencies, no network:

Frequently asked questions

What does stale-asset-audit do?

one PHP file that finds pages serving a cached asset under an old ?v= cache key; zero dependencies, CI-friendly exit codes

Where is the code?

The repository is at https://github.com/bryanhamiltondev/stale-asset-audit - production-extracted, MIT-licensed where noted in the repo.

Need someone who ships like this?

Bryan Hamilton is a full-stack web engineer with 25+ years in PHP and JavaScript, available immediately for remote, hybrid or on-site roles in the NYC metro area.

Book a 30-min call →   Tech resume   All projects