Is there any short-cut to empty cache and hard reload in chrome for devs? - google-chrome

I'm trying to find if there is any shortcut option for emptying cache and hard reload shortcut in chrome instead of console logging and using the empty cache option.

If you are able to leave Dev Tools (F12 / CTRL+SHIFT+I) open, Network tab, check Disable cache, next time you reload any which way (click reload icon / CTRL+R / F5) it will do a reload that ALSO isn't cached.
I tested this by updating a source script that without "disabling cache" wouldn't update upon reload alone, or even with Dev Tools open and right-click the reload icon selecting Hard Reload. Would be a great Chrome Extension to make this occur whenever it's enabled though!

Related

Visual Studio/Chrome not updating HTML/Typescript

I am running my company's application locally and making some HTML/TS changes. However, whenever I save/hot reload and reload the browser, nothing changes.
I can stop debugging, build/rebuild, and run and the changes remain the same.
On a hunch I deleted the entire file from the directory and ran the application and nothing changed.
What am I missing here?
Web.Config is all configured to our dev environment currently, main web application is configured locally.
It turns out the problem was with Chrome. Inside Dev Tools -> Settings -> Network -> Disable cache (while DevTools is open).
When I clicked this option, it stopped caching old changes, and I was able to see my updates again with each hot reload.

Fiddler capturing traffic from a specific process stopped working in Chrome

Open Chrome and navigate to google.com
In Fiddler use the "Any Process" button to select that Chrome tab
In Fiddler the "Any Process" button changes to something like "chrome: 11788"
In the Chrome tab search for something
I expect traffic to be captured by Fiddler but no sessions are displayed. If I use "Any Process", traffic is captured from all applications.
The "Use Filters" checkbox is unchecked in the Filters tab.
I uninstalled and reinstalled Fiddler.
I have the latest version installed.
What else could I do?
Modern versions of Google Chrome use separate process for making requests; so the process of the main window, detected by the 'Any Process' tool, is different.
The team is considering a fix, but it is currently not implemented, see "Target Any Process" feature no longer working with Chrome.
Possible workarounds meanwhile are:
Use other filtering functionality - e.g. capture a request from Chrome, and from the Sessions view choose right click -> Filter now -> Show only process=<process number>.
Filter everything else. In Fiddler, uncheck Tools -> Options -> Connections -> Act as system proxy on startup. Then Start Chrome with manually specified proxy settings, pointing to the port on which Fiddler is listening:
chrome --proxy-server=http://localhost:8888
This way the only captured traffic will be from this instance of Chrome.
Detailed version: Why Fiddler's Process Picker tool doesn't work with Chrome anymore
Brief version: For security and performance reasons Chrome now handles network requests through a separate network service. So when you are pointing the 'Any Process' tool of Fiddler on any Chrome window/tab, you are actually pointing to the UI (browser process) of Chrome browser.
There is one quick workaround for this:
Navigate to chrome://flags/#network-service-in-process in your Chrome browser. You would see Runs network service in-process and its value would be set to Default.
Change the value from Default to Enabled. By doing this you are telling Chrome to handle network requests from the browser process which also handles the UI.
Restart Chrome. You should now be able to capture network requests by pointing the Any Process tool on any Chrome tab.
Once you are done with your development activities do not forget to set the flag back to Default. This would give better performance.
NOTE: At the point of writing this, I am using Chrome 84.

How to clear DNS cache in google chrome

On Linux Debian 10 (Buster), I am using the http(s) client google-chrome-stable.
I was configuring (nginx) and testing (chrome) a reverse proxy and it got cached using a wrong domain.
I fixed the configuration but it still resolve to the wrong domain.
I have tried to go chrome://net-internals/#dns and click on Clear host cache but that didn't change anything.
I have tried to go chrome://net-internals/#sockets and click on Flush socket pools but that didn't change anything.
I am not working with FireFox, so FireFox can resolve correctly (so does curl).
After about 10 minutes, without restarting chrome. I did F5 (refresh) and it was loading the proper page. I haven't found a manual way to immediatly clear chrome cache.
I am doing devops and I haven't solved this issue for years.
Would love to know how to do one day :O
What happens if you open developer console F12 and then hold down on the refresh button and then select empty cache and hard reload?
Take a look at this gif for an example.

Is there a way to add Chrome Dedicated Developer Tools to Chrome Apps list?

When debugging server side code with Chrome Inspector, you have to reload Inspector every time you restart the server (as the URI changes). I eventually found out that if you use the Open dedicated DevTools for Node link in chrome://inspect/#devices, this tool will automatically reload with a node restart. This tool is also cool because you get a new window with the app as a full-page, like:
So, here's the questie: Is it possible to add Open Dedicated DevTools as an App to Chrome's Apps page?

Disable cache only for newly modified scripts in chrome?

Is it possible to disable the cache for scripts only (in chrome)? I would like to avoid reloading the entire web application (only reload the files I modified).
I know about hot reload, but sometimes I still need to restart the application.
Go into More Tools>Developer tools. Under General Settings check off "Disable cache (while DevTools is open)"
EDIT: I found a Chrome Extension called Cache killer, maybe you should check that out.