Closed Bug 265636 Opened 20 years ago Closed 20 years ago

DNS: don't read hosts file on new window/tab

Categories

(Core :: Networking, enhancement)

x86
Windows XP
enhancement
Not set
normal

Tracking

()

VERIFIED WONTFIX

People

(Reporter: rguico+bugzilla, Assigned: darin.moz)

Details

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; rv:1.7.3) Gecko/20040913 Firefox/0.10.1
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; rv:1.7.3) Gecko/20040913 Firefox/0.10.1

Not sure if this will be a WONTFIX... but IE pulls a fresh copy of the hosts
definition every time a new browser window is opened. Mozilla browsers won't
until all windows of the process are killed. This is primarily a web developer
feature.

Is it possible to read the hosts file on new window/tab launch every time?

Reproducible: Always
Steps to Reproduce:
1. Open Firefox, Ping a website (http://www.slashdot.org)
2. Change your hostsfile to something different (perhaps 127.0.0.1
http://www.slashdot.org)
3. Open another Firefox window. http://www.slashdot.org resolves to its original
website still.
Actual Results:  
Browser resolved website to old value in HOSTS.

Expected Results:  
Browser should have resolved the website to the new value in HOSTS.

It is worth mentioning that the command line doesn't pick up hosts file changes
unti it is restarted.

The workaround is just to start afresh with a new browser process every time the
hosts file changes.
let me note that mozilla does not read the hosts file at all. it just asks the
OS to resolve the name.

does going offline and online again help? (file|work offline)
Mozilla doesn't read the hostfile, the OS DNS resolver does it an Mozilla use
the windows resolver for DNS Informations but Mozilla also caches the DNS
informations for a short time (60s ?) for performance reasons.

There is bug 198594 which would solve this if you do a shift+reload and that's
better than cleareing the DNS cache for every Tab/window.

Suggesting wontfix
I've confirmed that Christian's suggestion works, and is an adequate workaround,
especially if there's a simple extension to trigger a work offline-work online
cycle. Bug 198594 would also be an acceptable resolution, but I don't see that
one getting to a branch anytime soon.
Status: UNCONFIRMED → RESOLVED
Closed: 20 years ago
Resolution: --- → WONTFIX
File->Work Offline ??  that's available in 1.0PR... is that not sufficient?
This is more so because IE starts a new instance for itself in every window,
mozilla is a single application for all windows. (sort of an
over-simplification, but goes to the same thing about IE windows having their
own cookie collections too).
Status: RESOLVED → VERIFIED
Summary: Mozilla browsers don't read hosts file on new window/tab → DNS: don't read hosts file on new window/tab
You need to log in before you can comment on or make changes to this bug.