hi Chrome DevTools team and community members,
Currently, we have a DevTools option "Disable cache (while DevTools is open)".
The problem is, if build tool (like Gulp) triggers a new tab with a developed web page, DevTools is not open, and one needs to refresh the page manually.
The "Disable cache (while DevTools is open)" relies on the assumption that Build system will fire up developed pages injecting differences in the same tab and will not open a new tab. That's the case with Webpack+React boilerplates but should not be taken for granted and, in my case, with home-brew Gulp tasks, I can inject only the CSS but not file changes.
People already raised this on:
and currently, solutions are not optimal:
1. Manually refreshing to prevent caching is wrong — that's all the ways, including right clicking "'empty Cache and Hard reload" on refresh button.
2. DevTools option "Disable cache (while DevTools is open)" does not work if the project is fired up in a new tab because DevTools is not open yet.
3. Permanent cache disabling is wrong because normal people use same machine for "work" and "play" and that would affect "play"
4. Apache/server-side solutions are irrelevant on simple, local Gulp+Browsersync setups.
5. Extensions seem a dodgy way to solve this essential feature. Plus there are security concerns when doing commercial work.
PROPOSAL:
What if we added a feature in Chrome to permanently disable caching on chosen domains, the first candidate being localhost:**** (variable port)?
It could be a new DevTools option, "Disable cache per domain" and allow wildcards.
In general, I think it is a common sense that localhost pages should not be cached on a default setting.
Thank you.