Changes to my site don't show up unless I clear cached files, and it happens in multiple browsers. I tried disabling caching in the page header, but it hasn't helped. What should I check?
Why do I have to clear my browser cache after every website edit?
Answers
Open your browser's developer tools, go to the Network tab, and enable the option to disable cache. Leave developer tools open while you're editing and reloading. In many browsers the setting only applies while those tools are open.
That should save you from clearing everything after each change during development.
Reply to this answer
For a quick check, try a hard refresh instead of clearing the whole cache. Ctrl+F5 or Ctrl+Shift+R works in many browsers on Windows. The shortcut varies by browser and operating system.
Reply to this answer
If this also affects visitors after a deployment, look into versioned asset filenames. A build tool can put a content hash in the CSS or JavaScript filename, so a changed file gets a new URL while unchanged files can stay cached.
That's a different goal from disabling the cache while you work. You still need the page to reference the new filenames when you deploy.
Reply to this answer
Check the actual response headers in the Network tab, not just the code in the page header. Cache-Control is an HTTP response header, and no-cache means a stored response must be revalidated before reuse, not that it cannot be stored.
Before changing production headers, check where the site is served from and which file is staying stale. The right setting can differ for the page and its assets.
Reply to this answer
A private window can be a quick comparison, but it isn't a permanent cache-free mode. Files can still be cached during that private session, so it won't necessarily fix repeated edits.
Reply to this answer
Add your answer
Answers are reviewed before publication.
census_49!incomplete:
Is the stale file the HTML itself, or is it a CSS, JavaScript, or image file? That would help narrow down what to inspect.