Is there a way to cause chrome/ie/firefox to reload the local "hosts" file without restarting the app?

In my occupation as a sysadmin, I often find times where I need to "game the system" by editing the host file. Doing so preempts any dns records for a domain name and allows me to make the ip whatever I want for a given hostname. This is extremely useful.

The downside to this is that every time I want to change that same hostname to a different IP, I believe I have to close the browser application before the change will take effect. In situations like chrome where I literally have 50-60 tabs open, this can get rather tedious.

Does anyone know of an alternate way to cause these apps to reload the hosts file?

EDIT -- I am speaking in terms of the Windows family of operating systems, specifically Windows 7 and/or Windows Server 2008R2 .


When using chrome, you can go to

chrome://net-internals/#dns
and purge the dns resolver cache. As iglvzx mentioned, you can use extensions in firefox to achieve the same function. Unfortunately, it appears that Internet Explorer has no analogous feature at this time.

In Chrome go to chrome://net-internals/#sockets then click "Flush socket pools", from https://www.askmehelpdesk.com/chrome/how-can-set-chrome-use-local-dns-hosts-file-831226.html


Have you tried any of the add-ons available for Firefox? Try searching for hosts or dns.