Chrome caches DNS records and tends to ignore changes to the hosts file after it has successfully connected to my site (barring a restart). With DNS pre-fetching enabled, it is even more pronounced.
Are there any page headers that will instruct Chrome not to cache a site's DNS? Like Cache-Control or a response status like 307 Temporary Redirect?
I'm not sure if this is exactly what you're looking for, but this annoys me too switching dev environments, and I stumbled across this internal chrome page that lets you clear the cache by the click of a button:
chrome://net-internals/#dns. After going there click the Clear host cache button.
Edit
As noted in an answer below, the reason this doesn't immediately take effect is that you also need to flush the open sockets. After clearing DNS cache, also go to: chrome://net-internals/#sockets and click on the Flush socket pools buttons.
Also keep in mind the operating system might do its own level of caching. Linux doesn't cache dns entries I think (at least for me clearing the chrome cache is good enough), but for windows or mac you might need to flush the OS-level DNS cache as well. Run ipconfig /flushdns from command line for windows or sudo dscacheutil -flushcache from command line for mac.
This is probably a real bug in Google Chrome. I created http://crbug.com/65570 to track it, but please add any additional information you can think of to the bug so we're sure we understand your problem correctly.
It sounds as though the only work-around besides closing Chrome is unplugging the network cable and then plugging it back in. When Chrome sees such an event, it drops its socket and dns cache. The correct solution for the bug is likely to do the same when we see /etc/hosts has changed.
If you'd like to know when the bug is fixed, go to http://crbug.com/65570 and click the star next to the bug number. And, like I said, please add any additional information you can to the bug.
In my case I often switch from my dev web server and a production server using custom hosts files, in order to clear all the dns cached info from chrome I use this procedure, and it works instantly in the same tab where I need to load the updated web site address:
Copy and paste this url in chrome: chrome://net-internals/#dns
Click on the "Clear Host Cache" button and also click on the small black arrow in the top right corner of the window, click "Clear cache" and "Flusk Sockets", and the new address will be loaded istantly.
Related
Now that FF has a sync feature, and assuming that there are folks who are ok with their data being stored on the cloud, does it still make sense to have a backup process using MozBackup?
More background:
I have a script that I use to take a zip of the complete profile folder, and move it from time-to-time onto my cloud backups. But, since FF Sync does all the backups (including preferences, open tabs, bookmarks, installed extensions, themes), I am not sure if I still need such a manual backup. as long as I click the "Sync now" button/menu item from time-to-time, can I rest assured that my offline backup is no longer needed?
I found out that the FF Sync does indeed sync the preferences, installed addons, etc, and all the open tabs on the first machine showed up in the "sync sidebar" on the second machine as well. BUT, the synced tabs lose a couple of important "features"
The order of the open tabs is messed up
The status of whether tab was pinned or not was also lost.
With the above, at this point, I feel I still need to continue with a full-backup of the profile folder.
I'm doing some front end work and I need to test how the program reacts when it loses a network connection. Firefox has a "Work offline" setting but that drops the connection for every tab -- I only want to disable the network connection for a single tab. Chrome has this with an "Offline" checkbox in the Network tab of the devtools that makes this really convenient.
This is what this feature looks like in Chrome:
The best solution I've found is to use "Request Blocking". Add * to match all requests. It also blocks local requests.
~~As of at most v97, work offline can be found by clicking File > Work Offline in the top left of the window. If you do not have the File menu, try pressing alt to make it appear.
As commentators note, this apparently allows requests to localhost, and will set all of your tabs to offline mode.~~
Greg has a much better answer
Yes we do have the option in firefox
version: 65.01
Click on the setting button(hamburger)
Then click the web developer option
Then click on the work offline option
For at least Firefox v92 (and probably previous ones) offline mode can be found by pressing ALT to bring up the File/Edit/View etc menus, then File > Work Offline.
Like in the title, how to clear that cache?
There are some plugins, but its installation is disabled for Firefox Quantum...
https://addons.mozilla.org/en-US/firefox/addon/dns-flusher/
https://addons.mozilla.org/en-us/firefox/addon/clear-dns-cache/
You can take look at about:networking#dns which directly lets you clear the cache.
And Where does Firefox keep cached DNS responses? had already been answered by Firefox's Support Team.
ScreenShot:
By the way for chrome it is chrome://net-internals/#dns
Open Preferences by typing about:preferences in address bar
Goto Privacy & Security in the menu on the left side
In the History Section click at the link clear your recent history and select:
Time range to clear: Today (or whatever fits)
Under details select Cache
Submit form with Clear now
This worked for me and is the same as the other answer which was down-voted by any reason, maybe people didn't actually try or maybe something else was missing. Not sure if also the DNS cache of the OS needs to be cleared:
On macOS I typed in command line: sudo killall -HUP mDNSResponder;say DNS cache has been flushed
On Windows it should be Start > Type: cmd > run: ipconfig /flushdns
Restart browser to flush DNS cache.
DNS cache is not stored on disk.
Or type: about:networking (see great answer by Shakiba Moshiri)
The new extension framework used by Firefox Quantum doesn't allow functionality like provided by these extensions. That is why they are not being updated to work with Firefox Quantum.
So the way to actually clear the cache is as follows
Go to the History menu
Select Clear Recent History
Check all boxes
Under Time range to clear select Everything (except passwords, if desired)
Click Clear Now.
Does anyone know how I could access the Firefox preferences hash table when it is running? I want to see what preferences exist in the hash table.
I'm pretty sure it's not possible to programmatically (via web) access about:config preferences. I've found this answer, where Wesley tells the same. I couldn't yet find it in documentation that it's not possible, but I'm sure it is. If it is possible - it's a bug. A critical one.
If a browser allowed this - it would be a huge security leak. Such configs might contain vulnerable data, possibly private or even embarrasing. For example browser.newtabpage.blocked pref contains blocked about:newtab sites, a trace of user's history.
It is however possible to access preferences when driving firefox by an external software, that interacts with firefox UI. It is then perfectly OK, because a user has to initiate such an action.
I'm having trouble downloading files from my client's development server.
They said that one of their connections is working just fine with the exact same FTP credentials.
To help resolve the problem they asked me to give them "Toggle Transcripts"
What are toggle transcripts and how can I get them from CyberDuck?
In my version, I have a "Toggle Log Drawer" menu option (under the View menu, I think). Selecting this reveals an extra window element, where information about the FTP session is printed. In your case, this window may contain information that your client can use to diagnose the problem. It's just a log of your activity when using Cyberduck.