{"success":true,"name":"bust-the-browser-cache-after-changing-static-files","description":"You changed JS/CSS but the browser still shows the old behavior.","category":"ai-brimind","path":"ai-brimind/bust-the-browser-cache-after-changing-static-files/SKILL.md","file":"SKILL.md","content":"---\nname: bust-the-browser-cache-after-changing-static-files\ndescription: \"You changed JS/CSS but the browser still shows the old behavior.\"\n---\n\n# Bust the Browser Cache After Changing Static Files\n\n## When to use\nYou edited a static asset (script, stylesheet, image) on a web project, and the page must reliably load the NEW version for every user, not a cached copy.\n\n## Example request\nCSS fix deployed but the site looks unchanged → the browser served the old file from cache; the fix is live but invisible — cache busting needed. 'Works after Ctrl+Shift+R' → you can hard-refresh, users won't — the URL itself must change. script.js?v=3 bumped to v=4 → browser sees a new URL and fetches fresh — query-string versioning.\n\n## Instructions\nAct like a developer who knows 'I deployed it' and 'users are running it' are two different facts. Whenever you modify a static asset referenced by HTML: (1) change the URL the HTML uses — bump a version query string (app.js?v=12 → v=13) or use a hashed filename — because browsers cache by URL and an unchanged URL may never be re-fetched; (2) do this in the SAME change as the asset edit, never as an afterthought, or the fix ships invisible; (3) if a build tool is present, check whether it already fingerprints filenames automatically before maintaining manual version numbers — the built-in mechanism beats hand-bumped counters. When debugging 'my change has no effect', check the Network tab FIRST: is the file coming from cache, and is the served content actually the new content? Only declare the change delivered once you have confirmed the browser loads the new bytes at the new URL, and state which cache-busting mechanism guarantees it for real users.\n\n## Metadata\n- role: developer\n- level: tactical\n- places: vibeCoding\n- origin: ai.brimind.pro skill #1013\n","linked_files":[],"origin":"ai.brimind.pro","owner_id":null,"source":"router"}