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

Posted on 2005-03-07
Medium Priority
Last Modified: 2008-01-09
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?
Question by:HappyEngineer
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
LVL 85

Accepted Solution

oBdA earned 1000 total points
ID: 13481500
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.

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Recently, I had the need to build a standalone system to run a point-of-sale system. I’m running this on a low-voltage Atom processor, so I wanted a light-weight operating system, but still needed Windows. I chose to use Microsoft Windows Server 200…
Learn about cloud computing and its benefits for small business owners.
NetCrunch network monitor is a highly extensive platform for network monitoring and alert generation. In this video you'll see a live demo of NetCrunch with most notable features explained in a walk-through manner. You'll also get to know the philos…
In this video, Percona Solution Engineer Dimitri Vanoverbeke discusses why you want to use at least three nodes in a database cluster. To discuss how Percona Consulting can help with your design and architecture needs for your database and infras…
Suggested Courses

764 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question