In some cases, when you normally use /etc/hosts to check if a new created website is working as expected, it can be useful to disable the browser dns records caching (yes, on the client side), especially when you are about to move a site and you cannot afford to stay offline.
Thus you will be able to check the fresh uploaded website against a new IP address.
In a few cases, if you don’t have to check for session-related problems, or simply, you just have to check if the home page opens up correctly, then you can use my Hostname Website checker for websites with no dns record without the necessity to edit your /etc/hosts file.
Anyway the most of the time it is not sufficient. Also the browser dns cache lasts (basing on my experience) likely ~20 minutes, thus means that even if you change your /etc/hosts file, you still have to wait until the browser cached record expires, otherwise you will continue to connect to the “OLD” address (copying a website complicates more this duty, because you have to be sure about what you are watching, isn’t it?).
So, let’s open Firefox and access its configuration by typing
in its address bar, as follows
Then we have now to create a new preference. To do this right click any part of on the list of parameters and click on “New” then “Integer” in the context submenu.
You will be prompter for the name of the new parameter, just enter:
Right after the name of the new integer, you will be prompted for its value, just insert
If all went fine, you should end up with like so:
Now your browser will do a dns request each time you will open a web page.
Hope this helps as much as it helped me.