Feature request: Permanently disable cache on localhost (or any domain using wildcards), with devtools open or not

2,118 views
Skip to first unread message

Roy Revelt

unread,
Jun 30, 2019, 12:54:25 PM6/30/19
to Chrome DevTools
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.

PhistucK

unread,
Jun 30, 2019, 1:24:15 PM6/30/19
to Google Chrome Developer Tools
I think you can do that with an extension (that does not mean it should not be added to the browser, though).

PhistucK


--
You received this message because you are subscribed to the Google Groups "Chrome DevTools" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-chrome-develo...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-chrome-developer-tools/1a7caab3-ed93-4488-b825-6f97725c2dfe%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Tony Hayik

unread,
Nov 12, 2019, 9:29:10 PM11/12/19
to Chrome DevTools
i agree
with everything u say

Yang Guo

unread,
Nov 13, 2019, 12:30:12 AM11/13/19
to Google Chrome Developer Tools
Is using a suitable Cache-Control HTTP header on your dev server not an option?

Yang

--
You received this message because you are subscribed to the Google Groups "Chrome DevTools" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-chrome-develo...@googlegroups.com.
Message has been deleted

Yang Guo

unread,
Nov 28, 2019, 7:34:51 AM11/28/19
to Google Chrome Developer Tools
I guess that's debatable. Either way though, this is not a DevTools issue? You may want to file a bug to crbug.com.

Yang

On Thu, Nov 28, 2019 at 8:19 AM Roy Revelt <r...@codsen.com> wrote:
hi Yang,

Maybe a header on a dev server is an option, in theory, but it's not practical.
Chrome should do it automatically, it should never cache localhost pages. At least by default.

--
You received this message because you are subscribed to the Google Groups "Chrome DevTools" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-chrome-develo...@googlegroups.com.

Elias Touil

unread,
Apr 27, 2020, 6:29:54 PM4/27/20
to Chrome DevTools
I'm experiencing the same kind of problem.

Maybe it could just be a shortcut (like it use to be a few years ago), cmd-shift-r to empty cache and hard reload? 

Yang Guo

unread,
Apr 27, 2020, 6:39:19 PM4/27/20
to Google Chrome Developer Tools
Please file a feature request to crbug.com with Platform>DevTools as component. Thanks!

Yang

--
You received this message because you are subscribed to the Google Groups "Chrome DevTools" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-chrome-develo...@googlegroups.com.

herb munson

unread,
Apr 27, 2020, 7:42:45 PM4/27/20
to google-chrome-...@googlegroups.com
Don't think I've ever participated in these discussions, and pardon me if this is an ignorant reply, but I would worry about the permanence of dramatic and invisible configuration changes.

And I know nothing whatsoever about Gulp.  Nonetheless, what about an alternative option to start the debugger on any new tab, if it is already open on  the current tab?

And re localhost pages...I think it is common sense.  localhost pages should, by default, should not be cached.

--
You received this message because you are subscribed to the Google Groups "Chrome DevTools" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-chrome-develo...@googlegroups.com.

guest271314

unread,
May 24, 2020, 7:22:29 PM5/24/20
to Chrome DevTools
If you have control over the code being run you can substitute

fetch('/path/to/resource', {cache:'no-store'})

for existing fetch() calls that do not set the cache option to 'no-store'.

Note, AudioWorklet performance is directly impacted by cache being disabled.

Ronald Chapman

unread,
Jun 2, 2020, 1:25:28 AM6/2/20
to google-chrome-...@googlegroups.com
At this time your request is denied for informal process of set Quality standardized practices of LEGALLY LEGAL HEAD OFFICER OVER OPERATIONS RONALD E CHAPMAN INTERNET SECURITY TERRORISTICAL TASKS FORCES WATCH GROUPINGD said Private Secret Sector Only Admitted To Viewing Secure Documents Applied 03/07/2013 By Ronald E Chapman Head Officer In Charge Of Security Operationally Functionality Point of Break Int.Secure at Ron...@github.security Please  Mail To LEGALLY LEGAL Secure Press Boxes Google/GitHub Secret Organizations Terroristical Watch Groupings N0722710674rec and I will Consider Signing Off If unopposed by Other Board Member under My Sector Of Operations Thanks 

--
Reply all
Reply to author
Forward
0 new messages