• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1699
  • Last Modified:

reloading HOSTS file without restarting browser (Opera,Mozilla,IE)

Is there a way to reload my HOSTS file immediately without restarting my browser?

I'm a web developer and change my HOSTS file to point to my local machine and then one development machine and then another, etc. I have scripts set up to instantly switch to whatever HOSTS file I want to use at the moment.

I've got IE set up to run in a new process for each instance of the browser. As a result, opening a new IE window causes it to use the latest HOSTS file.

I'm not aware of a way to do this with either Firefox/Mozilla or Opera. They both open new windows in the same process AFAIK.

I've found that if I wait a while that all browsers will eventually start using the latest HOSTS file, but I have no idea when the update occurs.

So, is there a way to do this? Is there a way to force Mozilla/Firefox or Opera to use the latest HOSTS file right away?
0
HappyEngineer
Asked:
HappyEngineer
1 Solution
 
oBdACommented:
An
ipconfig /flushdns
will clear the local DNS cache and force a reload of the hosts file as well. The rest is up to the application. If they keep their own cache, there's not a lot you can do. I managed to redirect Opera successfully to a different IP for a fqdn (that hadn't been resolved in the current session) using the hosts file without restart, but can't get it back now to the "original"; even after clearing Opera's cache (and removing the hosts entry), it still tries to go the wrong address.
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now